Skip to content
Nuveki
Try it free

Read one run

GET
/api/v0/runs/{id}
curl --request GET \
--url https://api.nuveki.ai/api/v0/runs/example \
--header 'Authorization: Bearer <token>'

Its state, and once it has ended its answer, usage and cost, or the refusal it ended with. Poll it every few seconds after wait: false.

id
required
string

The run’s id.

Media typeapplication/json
object
id
required

The run’s id: read it with GET /api/v0/runs/{id}, cancel it with POST /api/v0/runs/{id}/cancel.

string
object
required
string
Allowed values: run
status
required

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.

string
Allowed values: queued running completed no_answer blocked refused failed cancelled
conversationId
required
One of:
string
messageId
required
One of:
string
target
required
object
kind
required

auto: neither was named, and the run chose among what this key may run.

string
Allowed values: agent team auto
username

The agent or team named; absent for auto.

string
agent
required
One of:
object
agentId
required
string
username
required
string
name
required
string
participants
required

Every agent that took part in the run, the answering one included.

Array<object>
object
agentId
required
string
username
required
string
name
required
string
output
required
object
text
required

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.

string
files
required

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.

Array<object>
object
id
required

The file’s id: the one the answer’s own /api/files/proxy/<id> references name.

string
name
required
string
mimeType
required
string
size
required

In bytes.

integer
url
required

A signed download link for this key’s identity, good until expiresAt.

string
expiresAt
required
string format: date-time
json
One of:
object
violation
One of:
object
reason
required

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.

string
Allowed values: empty not_json schema invalid_schema
errors
required

At most five of the validator’s errors.

Array<string>
notice
required
One of:
object
kind
required
string
Allowed values: content_filter safety image_safety recitation refusal max_tokens empty unavailable failed limit model_unavailable security_block
message
required

Why the run has no answer, in the platform’s words.

string
error
required
One of:
object
statusCode
required

The HTTP status the run answered, or would have.

integer
code
required
One of:
string
message
required
string
usage
required
One of:
object
inputTokens
required
integer
outputTokens
required
integer
totalTokens
required
integer
costUsd
required

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.

number
metadata
required
One of:
object
key
additional properties
string
batchId
required
One of:
string
scheduleId
required
One of:
string
createdAt
required
string format: date-time
finishedAt
required
One of:
string format: date-time
durationMs
required
One of:
integer

Example

{
"object": "run",
"status": "queued",
"target": {
"kind": "agent"
},
"output": {
"files": [
{
"mimeType": "image/png"
}
],
"violation": {
"reason": "empty"
}
},
"notice": {
"kind": "content_filter"
},
"usage": {
"costUsd": 0.001623
}
}
X-Nuveki-Api-Stability
string
Allowed values: unstable

unstable: /v0 may change without notice.

X-Request-Id
string

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.

The request broke a rule (an unknown field or parameter is one): message lists each.

Media typeapplication/json

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
statusCode
required
integer
message
required
One of:
string
error
required

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.

string
timestamp
required
string format: date-time
path
required
string
code

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.

string
Allowed values: KEY_RATE_LIMIT_EXCEEDED KEY_DAILY_LIMIT_EXCEEDED KEY_MONTHLY_LIMIT_EXCEEDED KEY_CONCURRENCY_LIMIT ORG_CONCURRENCY_LIMIT PLATFORM_BUSY RUN_DEADLINE_EXCEEDED KEY_REVOKED ADMISSION_UNAVAILABLE RUN_FAILED RUN_CANCELLED RUN_INTERRUPTED RUN_ALREADY_FINISHED IDEMPOTENCY_KEY_IN_USE IDEMPOTENCY_KEY_REUSED RUN_NOT_STARTED KEY_QUEUE_FULL RUN_OVER_PER_MINUTE_BUDGET KEY_PROJECT_MISSING PROJECT_ARCHIVED CONVERSATION_IN_ANOTHER_PROJECT SCHEDULE_LIMIT_REACHED SCHEDULE_IN_ANOTHER_PROJECT SCHEDULE_FINISHED RATE_LIMITED
retryAfter

Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.

integer
retryAfterSeconds

Seconds until the organization’s budget resets, on a refusal by that budget.

integer
exceedsPerMinuteLimit

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.

boolean
conversationId

The conversation of a run stopped after it started: what it wrote and paid for before it stopped.

string
runId

The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.

string

Example

{
"code": "KEY_RATE_LIMIT_EXCEEDED"
}

The key is missing, unknown, revoked or expired, or its organization has no admin left who could revoke it.

Media typeapplication/json

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
statusCode
required
integer
message
required
One of:
string
error
required

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.

string
timestamp
required
string format: date-time
path
required
string
code

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.

string
Allowed values: KEY_RATE_LIMIT_EXCEEDED KEY_DAILY_LIMIT_EXCEEDED KEY_MONTHLY_LIMIT_EXCEEDED KEY_CONCURRENCY_LIMIT ORG_CONCURRENCY_LIMIT PLATFORM_BUSY RUN_DEADLINE_EXCEEDED KEY_REVOKED ADMISSION_UNAVAILABLE RUN_FAILED RUN_CANCELLED RUN_INTERRUPTED RUN_ALREADY_FINISHED IDEMPOTENCY_KEY_IN_USE IDEMPOTENCY_KEY_REUSED RUN_NOT_STARTED KEY_QUEUE_FULL RUN_OVER_PER_MINUTE_BUDGET KEY_PROJECT_MISSING PROJECT_ARCHIVED CONVERSATION_IN_ANOTHER_PROJECT SCHEDULE_LIMIT_REACHED SCHEDULE_IN_ANOTHER_PROJECT SCHEDULE_FINISHED RATE_LIMITED
retryAfter

Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.

integer
retryAfterSeconds

Seconds until the organization’s budget resets, on a refusal by that budget.

integer
exceedsPerMinuteLimit

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.

boolean
conversationId

The conversation of a run stopped after it started: what it wrote and paid for before it stopped.

string
runId

The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.

string

Example

{
"code": "KEY_RATE_LIMIT_EXCEEDED"
}

No run of this key has this id: it is another key’s, or it is no longer kept.

Media typeapplication/json

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
statusCode
required
integer
message
required
One of:
string
error
required

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.

string
timestamp
required
string format: date-time
path
required
string
code

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.

string
Allowed values: KEY_RATE_LIMIT_EXCEEDED KEY_DAILY_LIMIT_EXCEEDED KEY_MONTHLY_LIMIT_EXCEEDED KEY_CONCURRENCY_LIMIT ORG_CONCURRENCY_LIMIT PLATFORM_BUSY RUN_DEADLINE_EXCEEDED KEY_REVOKED ADMISSION_UNAVAILABLE RUN_FAILED RUN_CANCELLED RUN_INTERRUPTED RUN_ALREADY_FINISHED IDEMPOTENCY_KEY_IN_USE IDEMPOTENCY_KEY_REUSED RUN_NOT_STARTED KEY_QUEUE_FULL RUN_OVER_PER_MINUTE_BUDGET KEY_PROJECT_MISSING PROJECT_ARCHIVED CONVERSATION_IN_ANOTHER_PROJECT SCHEDULE_LIMIT_REACHED SCHEDULE_IN_ANOTHER_PROJECT SCHEDULE_FINISHED RATE_LIMITED
retryAfter

Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.

integer
retryAfterSeconds

Seconds until the organization’s budget resets, on a refusal by that budget.

integer
exceedsPerMinuteLimit

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.

boolean
conversationId

The conversation of a run stopped after it started: what it wrote and paid for before it stopped.

string
runId

The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.

string

Example

{
"code": "KEY_RATE_LIMIT_EXCEEDED"
}

code 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.

Media typeapplication/json

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
statusCode
required
integer
message
required
One of:
string
error
required

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.

string
timestamp
required
string format: date-time
path
required
string
code

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.

string
Allowed values: KEY_RATE_LIMIT_EXCEEDED KEY_DAILY_LIMIT_EXCEEDED KEY_MONTHLY_LIMIT_EXCEEDED KEY_CONCURRENCY_LIMIT ORG_CONCURRENCY_LIMIT PLATFORM_BUSY RUN_DEADLINE_EXCEEDED KEY_REVOKED ADMISSION_UNAVAILABLE RUN_FAILED RUN_CANCELLED RUN_INTERRUPTED RUN_ALREADY_FINISHED IDEMPOTENCY_KEY_IN_USE IDEMPOTENCY_KEY_REUSED RUN_NOT_STARTED KEY_QUEUE_FULL RUN_OVER_PER_MINUTE_BUDGET KEY_PROJECT_MISSING PROJECT_ARCHIVED CONVERSATION_IN_ANOTHER_PROJECT SCHEDULE_LIMIT_REACHED SCHEDULE_IN_ANOTHER_PROJECT SCHEDULE_FINISHED RATE_LIMITED
retryAfter

Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.

integer
retryAfterSeconds

Seconds until the organization’s budget resets, on a refusal by that budget.

integer
exceedsPerMinuteLimit

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.

boolean
conversationId

The conversation of a run stopped after it started: what it wrote and paid for before it stopped.

string
runId

The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.

string

Example

{
"code": "KEY_RATE_LIMIT_EXCEEDED"
}
Retry-After
integer

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.

Media typeapplication/json

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
statusCode
required
integer
message
required
One of:
string
error
required

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.

string
timestamp
required
string format: date-time
path
required
string
code

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.

string
Allowed values: KEY_RATE_LIMIT_EXCEEDED KEY_DAILY_LIMIT_EXCEEDED KEY_MONTHLY_LIMIT_EXCEEDED KEY_CONCURRENCY_LIMIT ORG_CONCURRENCY_LIMIT PLATFORM_BUSY RUN_DEADLINE_EXCEEDED KEY_REVOKED ADMISSION_UNAVAILABLE RUN_FAILED RUN_CANCELLED RUN_INTERRUPTED RUN_ALREADY_FINISHED IDEMPOTENCY_KEY_IN_USE IDEMPOTENCY_KEY_REUSED RUN_NOT_STARTED KEY_QUEUE_FULL RUN_OVER_PER_MINUTE_BUDGET KEY_PROJECT_MISSING PROJECT_ARCHIVED CONVERSATION_IN_ANOTHER_PROJECT SCHEDULE_LIMIT_REACHED SCHEDULE_IN_ANOTHER_PROJECT SCHEDULE_FINISHED RATE_LIMITED
retryAfter

Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.

integer
retryAfterSeconds

Seconds until the organization’s budget resets, on a refusal by that budget.

integer
exceedsPerMinuteLimit

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.

boolean
conversationId

The conversation of a run stopped after it started: what it wrote and paid for before it stopped.

string
runId

The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.

string

Example

{
"code": "KEY_RATE_LIMIT_EXCEEDED"
}