Start a run
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/runs \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"promptIds": [
"<string>"
],
"modelIds": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/runs"
payload = {
"promptIds": ["<string>"],
"modelIds": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({promptIds: ['<string>'], modelIds: ['<string>']})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Configure data
Start a run
Start a run for a live workspace, reserve the planned credits and begin asynchronous answer collection. Estimate the run first to review its cost.
POST
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
runs
Start a run
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/runs \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"promptIds": [
"<string>"
],
"modelIds": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/runs"
payload = {
"promptIds": ["<string>"],
"modelIds": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({promptIds: ['<string>'], modelIds: ['<string>']})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Creates a run for a
Generation is asynchronous. The usable prompt/model combination is planned
atomically; insufficient balance or a concurrent target change rejects the request.
See Error codes for authentication, plan, idempotency
and server errors. On
LIVE workspace and reserves the planned credit cost.
Estimate the run first to inspect usable
targets and cost. Creating the run revalidates both.
Requires an active Business, Agency Business or Enterprise plan. Use an API token with write access enabled. See Writing data for
idempotency, conditional requests and error handling.
Up to 50 active prompt UUIDs. Omit to select all active prompts. If that would
exceed 50, explicitly select a smaller set.
Up to 20 Qwairy model codes. Omit or send
[] to use the workspace’s
selected monitoring models; prompts with their own models keep them. Premium
models need a plan that includes them, and stored premium selections your
plan no longer includes are skipped, as in the dashboard.Response
Returns202 Accepted with a Location header pointing to
Get a run, plus:
| Run field | Meaning |
|---|---|
runId | The newly created run identifier |
promptCount, modelCount | Usable target dimensions |
unsupportedModels | Requested model codes excluded from the run |
Synthetic request and response
curl -i -X POST "https://www.qwairy.co/api/v1/brands/$BRAND_ID/runs" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H "Idempotency-Key: weekly-run-2026-09-01" \
-H "Content-Type: application/json" \
-d '{}'
{
"run":{
"runId":"55555555-0000-4000-8000-000000000000",
"promptCount":12,
"modelCount":2,
"unsupportedModels":[]
}
}
Follow progress
Get a run returns planning details. List runs includes overall status, outcome counts and progress. There are no public cancel, retry or refund endpoints.Errors
| Status | Code | Cause |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid targets or more than 50 selected prompts |
| 403 | INSUFFICIENT_PLAN | A requested model is a premium model your plan does not include |
| 404 | RESOURCE_NOT_FOUND | Workspace or requested prompt is inaccessible |
| 409 | CONFLICT | Workspace is not live, there is no usable target, or a target changed during planning |
| 409 | INSUFFICIENT_CREDITS | The full run cannot be funded |
| 409 | IDEMPOTENCY_CONFLICT | The same key was used with a different request |
429, honor Retry-After; writes can return
503 SERVICE_UNAVAILABLE if the write limiter is unavailable.
