Run an agent or a team
const url = 'https://api.nuveki.ai/api/v0/runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent":"data.analyst","input":"Summarize last week’s support tickets by theme."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.nuveki.ai/api/v0/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "agent": "data.analyst", "input": "Summarize last week’s support tickets by theme." }'One chat turn with the named agent or team — or, naming neither, whichever this key may run that fits — billed to the key’s organization. By default the answer comes when the run ends (often tens of seconds; at most 10 minutes). With wait: false it comes as soon as the run has started (202), and you read the result with GET /api/v0/runs/{id}. Pass the conversationId a run returned to continue that conversation, and an Idempotency-Key to retry safely.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The same as idempotencyKey in the body: a repeat with the same value is answered with the first run, never a second one. Send one or the other; both must agree.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The agent to answer, by username. Not with team. Leave out both to let the run choose among what this key may run.
The team to answer, by username: its agents this key may run take the request together. Not with agent.
What to ask, with any material the agent needs.
Continue a conversation an earlier run of this key opened, with its history: the conversationId that run returned.
Pictures for the agent to look at, as base64 data URLs of a JPEG, PNG, WebP or GIF.
Files for the agent to read, stored with the run and handed to the agent as a chat attachment is: text as text, anything else (PDF, Word, Excel, PowerPoint, OpenDocument) as base64 data, typed by its name. The platform checks the input — the request — not the material it is handed. An agent that cannot read a file it is handed is refused before the run is admitted.
object
The file name the agent sees: a letter or digit in it, no path, no space at either end or dot at the end, no control or invisible formatting characters. With data, its extension decides the type, which must be one the platform reads (PDF, Word, Excel, PowerPoint, OpenDocument, an image, a text format…).
The file as text. Exactly one of text and data.
The file as base64, for a file that is not text: a PDF, a spreadsheet, a slide deck. Exactly one of text and data.
Your own labels for the run’s conversation, kept with it and never read as an instruction.
object
route: an @mention in the input routes to an agent or team this key may run, as in a chat. ignore: the input is plain text. A run with output or tools: 'none' is one agent’s turn, so its mentions are always ignored, and route beside either is refused.
true: answer when the run ends. false: answer 202 as soon as the run has started, with its id; read the result with GET /api/v0/runs/{id}. Every limit is checked before either answer.
Your own unique value for this request, so a retry cannot start a second run: a repeat with the same value is answered with the first run, while this key keeps it. Reusing a value for a different request is refused (422). A run that was refused, failed, interrupted or abandoned by a caller that hung up frees its value, so the retry runs; an answered run, or one you cancelled, keeps it. On REST you may send the Idempotency-Key header instead.
none: the agent is offered no tools and no fixer runs after it, so it answers from the input alone — for a program that hands it everything it needs and wants nothing in the input to steer a call. Needs agent.
Ask the agent for one JSON document matching a schema instead of prose. The run answers it as output.json, or says in output.violation why the reply was not one. Needs agent.
object
The shape’s name, snake_case, up to 64 characters: providers name the schema with it.
A JSON Schema (draft-07) the whole answer must match, at most 32,000 characters serialized. Its descriptions are read by the agent as part of the platform’s instruction and are not security-checked: it is the program’s own configuration, so never build it from your users’ text — that goes in input. No pattern or patternProperties: a regular expression would run on the server, so say a format in the description instead. A schema whose check of an answer runs too long is answered as invalid_schema.
object
Examples
Run one agent
{ "agent": "data.analyst", "input": "Summarize last week’s support tickets by theme."}Run a team
{ "team": "research-team", "input": "Compare the three vendors in this note and recommend one: …"}Let Nuveki choose who answers
{ "input": "Draft a short, friendly reply to this customer email: …"}Explain a file as data, with no tools
{ "agent": "data.explainer", "tools": "none", "input": "Explain the attached file.", "documents": [ { "name": "rain.csv", "text": "city,year,rain_mm\nLisbon,2024,682\n" } ], "output": { "name": "file_explanation", "schema": { "type": "object", "properties": { "headline": { "type": "string", "description": "One sentence on what the file is" } }, "required": [ "headline" ] } }}Continue a conversation
{ "conversationId": "cmhb3w0vq0000abcd1234efgh", "input": "Now make it shorter."}Start a run and read its result later
{ "agent": "data.analyst", "input": "Analyse the attached quarter and list the three biggest risks.", "wait": false, "idempotencyKey": "order-1042"}Responses
Section titled “Responses”The run ended: completed, no_answer or blocked. A repeat of an earlier idempotent request answers that run, with Idempotent-Replayed: true.
object
The run’s id: read it with GET /api/v0/runs/{id}, cancel it with POST /api/v0/runs/{id}/cancel.
queued and running until it ends. completed: an agent answered. no_answer: the agent wrote nothing, and notice says why. blocked: the platform’s security check declined the input before any agent ran. refused: a limit or a rule refused it before it started; failed: it stopped after it started; cancelled: it was cancelled, or its caller hung up. Those three carry error.
object
auto: neither was named, and the run chose among what this key may run.
The agent or team named; absent for auto.
Every agent that took part in the run, the answering one included.
object
object
The answer, as the agent wrote it (Markdown). When status is no_answer, the platform’s note saying why, never the agent’s words; empty when blocked. A structured run’s reply as written, kept for a program that logs it.
The files the run’s answers made (a generated picture, a page, an export), oldest first, at most 20, never the run’s own inputs.
object
The file’s id: the one the answer’s own /api/files/proxy/<id> references name.
In bytes.
A signed download link for this key’s identity, good until expiresAt.
object
empty: no reply. not_json: the reply was not one JSON document (prose around it counts). schema: valid JSON in the wrong shape. invalid_schema: the schema could not be used to check the reply — it does not compile, or checking ran past its budget — so simplify it rather than ask again.
At most five of the validator’s errors.
object
What the run’s model, embedding and tool calls were billed, in US dollars to the micro-dollar, as booked so far: the same amount its organization is charged and the key’s spend caps count, so a run on a cheap model reads what it cost rather than 0. Calls an agent makes on its owner’s own endpoint (a custom model) are billed 0. Paid web retrieval is counted on the key’s daily usage only.
Example
{ "object": "run", "status": "queued", "target": { "kind": "agent" }, "output": { "files": [ { "mimeType": "image/png" } ], "violation": { "reason": "empty" } }, "notice": { "kind": "content_filter" }, "usage": { "costUsd": 0.001623 }}Headers
Section titled “Headers”unstable: /v0 may change without notice.
This request’s id: the X-Request-Id you sent, when it is at most 128 letters, digits and ._:-, otherwise one of ours. Every refusal carries it too; quote it to support.
Runs this key may start per minute. The three run-rate headers come on an answer whose run reached the key’s rate check: not on a repeat answered from an earlier run, nor on a refusal raised before that check.
Runs it may still start this minute.
Seconds until the minute resets.
true when this answers an earlier request with the same idempotency key.
wait: false: the run has started (running). Read it at Location.
object
The run’s id: read it with GET /api/v0/runs/{id}, cancel it with POST /api/v0/runs/{id}/cancel.
queued and running until it ends. completed: an agent answered. no_answer: the agent wrote nothing, and notice says why. blocked: the platform’s security check declined the input before any agent ran. refused: a limit or a rule refused it before it started; failed: it stopped after it started; cancelled: it was cancelled, or its caller hung up. Those three carry error.
object
auto: neither was named, and the run chose among what this key may run.
The agent or team named; absent for auto.
Every agent that took part in the run, the answering one included.
object
object
The answer, as the agent wrote it (Markdown). When status is no_answer, the platform’s note saying why, never the agent’s words; empty when blocked. A structured run’s reply as written, kept for a program that logs it.
The files the run’s answers made (a generated picture, a page, an export), oldest first, at most 20, never the run’s own inputs.
object
The file’s id: the one the answer’s own /api/files/proxy/<id> references name.
In bytes.
A signed download link for this key’s identity, good until expiresAt.
object
empty: no reply. not_json: the reply was not one JSON document (prose around it counts). schema: valid JSON in the wrong shape. invalid_schema: the schema could not be used to check the reply — it does not compile, or checking ran past its budget — so simplify it rather than ask again.
At most five of the validator’s errors.
object
What the run’s model, embedding and tool calls were billed, in US dollars to the micro-dollar, as booked so far: the same amount its organization is charged and the key’s spend caps count, so a run on a cheap model reads what it cost rather than 0. Calls an agent makes on its owner’s own endpoint (a custom model) are billed 0. Paid web retrieval is counted on the key’s daily usage only.
Example
{ "object": "run", "status": "queued", "target": { "kind": "agent" }, "output": { "files": [ { "mimeType": "image/png" } ], "violation": { "reason": "empty" } }, "notice": { "kind": "content_filter" }, "usage": { "costUsd": 0.001623 }}Headers
Section titled “Headers”unstable: /v0 may change without notice.
This request’s id: the X-Request-Id you sent, when it is at most 128 letters, digits and ._:-, otherwise one of ours. Every refusal carries it too; quote it to support.
Runs this key may start per minute. The three run-rate headers come on an answer whose run reached the key’s rate check: not on a repeat answered from an earlier run, nor on a refusal raised before that check.
Runs it may still start this minute.
Seconds until the minute resets.
true when this answers an earlier request with the same idempotency key.
Where to read the run: /api/v0/runs/{id}.
The request broke a rule (an unknown field or parameter is one): message lists each.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}The key is missing, unknown, revoked or expired. code: KEY_REVOKED when it was revoked while the run was in progress: the run was stopped, and conversationId names its conversation.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}The organization’s budget refused the run: error names the reason, and retryAfterSeconds how long until it resets where it does.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}The agent or team is not one this key may run (a roster-only key runs only what is deployed to its project), or a continued run names a different target or one that has left the key’s reach. A model the organization’s plan does not include is refused by its budget, named in error. KEY_PROJECT_MISSING: the key works in no project, since its project was deleted or the key was taken out of it; an organization admin gives it one. PROJECT_ARCHIVED: the key’s project is archived, so nothing runs in it until it is unarchived. CONVERSATION_IN_ANOTHER_PROJECT: the conversation was filed while the key worked in another project; start a new one.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}The conversation is not one this key opened.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}RUN_CANCELLED: the run was cancelled while you waited on it (conversationId names its conversation). IDEMPOTENCY_KEY_IN_USE: a run with this idempotency key is still in progress; read it at runId, or retry after retryAfter seconds.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}The body is over the server’s 25 MiB limit (26,214,400 bytes).
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}IDEMPOTENCY_KEY_REUSED: this idempotency key was used for a different request (runId names that run). Use a new value for a new request.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}A limit was reached, and code says which: the key’s runs in progress, its run rate, its daily or monthly spend, the organization’s or the platform’s capacity, or RATE_LIMITED: this key’s requests to this route came too fast (a bearer that is not an API key is counted by its address), or this address passed 600 requests a minute (a ceiling every key behind one address shares). Wait retryAfter seconds. A refusal by the organization’s budget names its reason in error and its wait in retryAfterSeconds, with no Retry-After header; one whose own estimate is above the per-minute budget says exceedsPerMinuteLimit, has the code RUN_OVER_PER_MINUTE_BUDGET (on a run read back too) and states no wait, since none lets it through.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}Headers
Section titled “Headers”Seconds to wait before trying again; the same as retryAfter.
The server failed before it could answer (a database outage, say). message is always Internal server error, with no detail; try again.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}RUN_FAILED: the run failed with no refusal of its own (a provider outage, say). conversationId names its conversation.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}ADMISSION_UNAVAILABLE: the key’s runs in progress cannot be counted right now, so none starts. Try again after retryAfter seconds (no Retry-After header).
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}RUN_DEADLINE_EXCEEDED: the run passed 10 minutes and was stopped. conversationId names its conversation.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}