Get run status and result
curl --request GET \
--url https://api.apisale.ai/v1/runs/{run_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.apisale.ai/v1/runs/{run_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.apisale.ai/v1/runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"run_id": "<string>",
"endpoint": "<string>",
"model": "<string>",
"capability": "<string>",
"mode": "<string>",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"output": {},
"error": {
"type": "<string>",
"code": 123,
"message": "<string>"
},
"billing": {
"amount": "<string>",
"currency": "usd"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123
}Model APIs
Poll & search runs
GET /v1/runs/ — poll until status is succeeded.
GET
/
v1
/
runs
/
{run_id}
Get run status and result
curl --request GET \
--url https://api.apisale.ai/v1/runs/{run_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.apisale.ai/v1/runs/{run_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.apisale.ai/v1/runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"run_id": "<string>",
"endpoint": "<string>",
"model": "<string>",
"capability": "<string>",
"mode": "<string>",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"output": {},
"error": {
"type": "<string>",
"code": 123,
"message": "<string>"
},
"billing": {
"amount": "<string>",
"currency": "usd"
},
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"elapsed_ms": 123
}After submitting a run, poll with the returned
Poll every 2–5 seconds until a terminal status.
Runs cannot be cancelled once submitted — they always proceed to a
terminal state (
run_id.
GET /v1/runs/
string
required
Same ID returned on submit.
string
required
queued → processing → succeeded | failed | timeout | cancelledobject
Present when
status is succeeded. Shape depends on the model (images, video URL, audio, etc.).object
{ code, message } when status is failed.Example
curl "https://api.apisale.ai/v1/runs/run_abc123" \
-H "Authorization: Key $APISALE_API_KEY"
{
"run_id": "run_abc123",
"endpoint": "google/nano-banana/text-to-image",
"status": "succeeded",
"output": {
"images": [{ "url": "https://cdn.example.com/out.png", "mime": "image/png" }]
},
"billing": { "amount": "0.031200", "currency": "usd" },
"completed_at": "2026-06-27T12:00:42.000Z",
"elapsed_ms": 42000
}
POST /v1/runs/search
List runs for your organization:curl -X POST "https://api.apisale.ai/v1/runs/search" \
-H "Authorization: Key $APISALE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"limit": 20,
"status": ["processing", "queued"]
}'
succeeded, failed, or timeout). Failed and timed-out
runs are never charged.Authorizations
API key: Key sk-xxx or Bearer sk-xxx
Path Parameters
Response
200 - application/json
Run status and result
Unique run identifier
Model slug
Available options:
queued, processing, succeeded, failed, timeout, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes
