Pular para o conteúdo

/api/v1/executions/{id}

GET
/api/v1/executions/{id}
curl --request GET \
--url https://api.endless.zaia.app/api/v1/executions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0

Retrieves an execution.

id
required

A UUID v4 string that identifies an entity.

string format: uuid

A UUID v4 string that identifies an entity.

Retrieves an execution.

Media typeapplication/json
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
updatedAt
required
string format: date-time
creditsUsed
required

The total number of credits used by this execution.

number
detail
required
Any of:
object
input
required

The input data for this execution.

object
key
additional properties
nullable
output
required

The output data for this execution.

object
key
additional properties
nullable
agentId
required

The agent identifier.

string
agentVersionId

The exact agent version identifier used by this execution.

string
events
required

The events that occurred during this agent execution.

Array
Any of:
object
contextUsage

The context usage snapshot recorded for a response breakpoint.

object
categories
required

The structural character breakdown of the context.

object
conversation
required

The estimated conversation character count.

integer
mcpDefinitions
required

The estimated MCP definition character count.

integer
summarizedConversation
required

The summarized conversation character count.

integer
systemPrompt
required

The system prompt character count.

integer
toolCalls
required

The tool call character count.

integer
toolDefinitions
required

The tool definition character count.

integer
toolResults
required

The tool result character count.

integer
compaction
required

The tool result compaction summary.

object
afterCharacters
required

The tool result character count after compaction.

integer
beforeCharacters
required

The tool result character count before compaction.

integer
compactedResults
required

The number of tool results compacted.

integer
slicedResults
required

The number of tool results sliced as an overflow fallback.

integer
contextLimitTokens
required

The model context window limit in tokens.

integer
>= 1
fallbackReason

Why the prepared runtime fell back to legacy behavior.

string
Allowed values: low-confidence preparation-error provider-incompatible schema-invalid timeout
inputTokens
required

The input token count reported by the provider.

integer
nullable
model
required

The model used for this response.

string
outputReserveTokens
required

The output token reserve kept outside the input budget.

integer
recordedAt
required

When the context usage snapshot was recorded.

string format: date-time
runtime
required

The runtime that generated the response.

string
Allowed values: legacy prepared
toolSearchMode

The tool search mode used by the prepared runtime.

string
Allowed values: native-anthropic native-openai platform-search
creditsUsed
required

The number of credits used by this event.

number
endedAt
required

When this event ended.

string format: date-time
nullable
id
required

The event identifier.

string
input
Any of:

The input data for this event.

nullable
label
required

The label for this event.

string
>= 3 characters <= 50 characters
llmUsages

The custom-provider LLM usages recorded for this event.

Array<object>
object
callKind

The logical LLM call category.

string
Allowed values: agent compact load preparation repair replan search verify json-output
inputTokens
required

The input token count reported by the LLM provider.

integer
nullable
model
required

The model key used for this LLM usage.

string
outputTokens
required

The output token count reported by the LLM provider.

integer
nullable
provider
required

The provider metadata associated with this LLM usage.

object
id
required

The provider ID associated with the LLM usage, when one exists.

string
nullable
name
required

The display name of the provider associated with the LLM usage.

string
>= 3 characters <= 50 characters
runtime

The runtime that generated the LLM usage.

string
Allowed values: legacy prepared
output
required

The output data for this event.

object
key
additional properties
nullable
startedAt
required

When this event started.

string format: date-time
status
required

The status of the event.

string
Allowed values: running completed failed skipped
llm
required

The model key used during the iteration event.

string
llmProvider
required

The provider metadata associated with the iteration event.

object
id
required

The provider ID associated with the LLM usage, when one exists.

string
nullable
name
required

The display name of the provider associated with the LLM usage.

string
>= 3 characters <= 50 characters
type
required

The event subtype represented by this payload.

string
Allowed values: iteration
origin
required
Any of:
object
apiKeyId
required

The API key identifier.

string
type
required

The execution origin subtype represented by this payload.

string
Allowed values: api
responseBreakpoints

The context usage snapshots recorded for generated responses.

Array<object>
object
categories
required

The structural character breakdown of the context.

object
conversation
required

The estimated conversation character count.

integer
mcpDefinitions
required

The estimated MCP definition character count.

integer
summarizedConversation
required

The summarized conversation character count.

integer
systemPrompt
required

The system prompt character count.

integer
toolCalls
required

The tool call character count.

integer
toolDefinitions
required

The tool definition character count.

integer
toolResults
required

The tool result character count.

integer
compaction
required

The tool result compaction summary.

object
afterCharacters
required

The tool result character count after compaction.

integer
beforeCharacters
required

The tool result character count before compaction.

integer
compactedResults
required

The number of tool results compacted.

integer
slicedResults
required

The number of tool results sliced as an overflow fallback.

integer
contextLimitTokens
required

The model context window limit in tokens.

integer
>= 1
fallbackReason

Why the prepared runtime fell back to legacy behavior.

string
Allowed values: low-confidence preparation-error provider-incompatible schema-invalid timeout
inputTokens
required

The input token count reported by the provider.

integer
nullable
model
required

The model used for this response.

string
outputReserveTokens
required

The output token reserve kept outside the input budget.

integer
recordedAt
required

When the context usage snapshot was recorded.

string format: date-time
runtime
required

The runtime that generated the response.

string
Allowed values: legacy prepared
toolSearchMode

The tool search mode used by the prepared runtime.

string
Allowed values: native-anthropic native-openai platform-search
type
required

The execution detail subtype represented by this payload.

string
Allowed values: agent-execution
endedAt
required

When this execution ended.

string format: date-time
nullable
isAgentic
required

Whether this execution is agentic.

boolean
isFailedAttempt
required

Whether this execution belongs to a failed retry attempt.

boolean
isPurged
required

Whether this execution has been purged.

boolean
parentId
required

The parent execution ID of this execution.

string format: uuid
nullable
responderId
required

The responder ID of this execution.

string
startedAt
required

When this execution started.

string format: date-time
status
required

The status of the execution.

string
Allowed values: running completed failed cancelled
workspaceId
required

The workspace ID of this execution.

string
Example
{
"detail": {
"events": [
{
"contextUsage": {
"fallbackReason": "low-confidence",
"runtime": "legacy",
"toolSearchMode": "native-anthropic"
},
"llmUsages": [
{
"callKind": "agent",
"runtime": "legacy"
}
],
"status": "running",
"type": "iteration"
}
],
"origin": {
"type": "api"
},
"responseBreakpoints": [
{
"fallbackReason": "low-confidence",
"runtime": "legacy",
"toolSearchMode": "native-anthropic"
}
],
"type": "agent-execution"
},
"status": "running"
}

Unauthorized.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Execution not found.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}