Submit a run for a model slug
curl --request POST \
--url https://api.apisale.ai/v1/run/{splat} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.apisale.ai/v1/run/{splat}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.apisale.ai/v1/run/{splat}', 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
Submit a run
POST /v1/run/ — returns run_id for async polling.
POST
/
v1
/
run
/
{splat}
Submit a run for a model slug
curl --request POST \
--url https://api.apisale.ai/v1/run/{splat} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.apisale.ai/v1/run/{splat}"
payload = {}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.apisale.ai/v1/run/{splat}', 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
}Submit inference for any model slug. The response is always a Run object with
Response (
Full catalog: Errors & limits.
run_id (not task_id).
Each model page under Image / Video / Audio has a Try it playground with that model’s
input schema pre-filled.Request body
object
required
Model-specific parameters. See the model page Parameters section. Fields marked with * are required.
string
Optional HTTPS URL — apisale POSTs the terminal Run JSON when the run finishes.
boolean
When
true, the connection blocks until the run reaches a terminal state (same run_id response shape).Example
curl -X POST "https://api.apisale.ai/v1/run/google/nano-banana/text-to-image" \
-H "Authorization: Key $APISALE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "A serene mountain lake at dawn"
}
}'
Response (201)
string
required
Save this to poll with
GET /v1/runs/{run_id}.string
required
queued (typical async) or succeeded / failed (sync or immediate).object
null until status is succeeded.object
{ amount, currency } when billed.Response headers
X-Concurrency-Limit: 10
X-Concurrency-In-Flight: 4
X-Concurrency-Remaining: 6
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 115
Errors
| HTTP | error.code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Bad or missing key |
| 402 | insufficient_balance | Top up in Console → Billing |
| 429 | concurrency_limit_exceeded | Back off — see Errors & limits |
| 451 | content_policy_violation | Revise prompt or media |
Next step
Poll the run or read Runs lifecycle.Authorizations
API key: Key sk-xxx or Bearer sk-xxx
Body
application/json
The body is of type object.
Response
201 - application/json
Run accepted
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
