/api/v1/squads/{id}/execute
const url = 'https://api.endless.zaia.app/api/v1/squads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/execute';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"context":"example","messages":[{"attachments":[{"base64":"example","extension":"png"}],"content":"example","role":"assistant"}],"output":{"properties":{"additionalProperty":{"description":"example","enum":["example"],"examples":["example"],"nullable":true,"type":"string"}},"required":["example"],"type":"object"}}'};
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.endless.zaia.app/api/v1/squads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/execute \ --header 'Content-Type: application/json' \ --data '{ "context": "example", "messages": [ { "attachments": [ { "base64": "example", "extension": "png" } ], "content": "example", "role": "assistant" } ], "output": { "properties": { "additionalProperty": { "description": "example", "enum": [ "example" ], "examples": [ "example" ], "nullable": true, "type": "string" } }, "required": [ "example" ], "type": "object" } }'Executes a squad with provided messages.
Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”A UUID v4 string that identifies an entity.
A UUID v4 string that identifies an entity.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
object
object
A base64 encoded string with prefix.
object
A base64 encoded string with prefix.
object
A base64 encoded string with prefix.
object
A base64 encoded string with prefix.
A JSON Schema definition object
object
object
object
object
object
object
object
object
object
Responses
Seção intitulada “Responses”The squad was executed.
object
object
A UUID v4 string that identifies an entity.
The total number of credits used by this execution.
object
The input data for this execution.
object
The output data for this execution.
object
The agent identifier.
The events that occurred during this agent execution.
object
The number of credits used by this event.
When this event ended.
The event identifier.
The label for this event.
The custom-provider LLM usages recorded for this event.
object
The input token count reported by the LLM provider.
The model key used for this LLM usage.
The output token count reported by the LLM provider.
The provider metadata associated with this LLM usage.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The output data for this event.
object
When this event started.
The status of the event.
The model key used during the iteration event.
The provider metadata associated with the iteration event.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The event subtype represented by this payload.
object
The number of credits used by this event.
When this event ended.
The event identifier.
The label for this event.
The custom-provider LLM usages recorded for this event.
object
The input token count reported by the LLM provider.
The model key used for this LLM usage.
The output token count reported by the LLM provider.
The provider metadata associated with this LLM usage.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The output data for this event.
object
When this event started.
The status of the event.
The child execution identifier.
The type of tool called.
The event subtype represented by this payload.
object
The API key identifier.
The execution origin subtype represented by this payload.
object
The chat message identifier.
The execution identifier of the prior retry attempt.
The execution origin subtype represented by this payload.
object
The agent identifier.
The execution origin subtype represented by this payload.
object
The execution origin subtype represented by this payload.
The workflow node identifier.
object
The source event type.
The external event identifier.
The source event provider.
The trigger identifier.
The execution origin subtype represented by this payload.
The execution detail subtype represented by this payload.
object
The input data for this execution.
object
The output data for this execution.
object
The agent identifier.
The events that occurred during this squad execution.
object
The number of credits used by this event.
When this event ended.
The event identifier.
The label for this event.
The custom-provider LLM usages recorded for this event.
object
The input token count reported by the LLM provider.
The model key used for this LLM usage.
The output token count reported by the LLM provider.
The provider metadata associated with this LLM usage.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The output data for this event.
object
When this event started.
The status of the event.
The model key used during the iteration event.
The provider metadata associated with the iteration event.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The event subtype represented by this payload.
object
The number of credits used by this event.
When this event ended.
The event identifier.
The label for this event.
The custom-provider LLM usages recorded for this event.
object
The input token count reported by the LLM provider.
The model key used for this LLM usage.
The output token count reported by the LLM provider.
The provider metadata associated with this LLM usage.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The output data for this event.
object
When this event started.
The status of the event.
The child execution identifier.
The type of tool called.
The event subtype represented by this payload.
object
The API key identifier.
The execution origin subtype represented by this payload.
object
The chat message identifier.
The execution identifier of the prior retry attempt.
The execution origin subtype represented by this payload.
object
The agent identifier.
The execution origin subtype represented by this payload.
object
The execution origin subtype represented by this payload.
The workflow node identifier.
object
The source event type.
The external event identifier.
The source event provider.
The trigger identifier.
The execution origin subtype represented by this payload.
The squad identifier.
The execution detail subtype represented by this payload.
object
The input data for this execution.
object
The output data for this execution.
object
The events that occurred during this workflow execution.
object
The number of credits used by this event.
When this event ended.
The event identifier.
The label for this event.
The custom-provider LLM usages recorded for this event.
object
The input token count reported by the LLM provider.
The model key used for this LLM usage.
The output token count reported by the LLM provider.
The provider metadata associated with this LLM usage.
object
The provider ID associated with the LLM usage, when one exists.
The display name of the provider associated with the LLM usage.
The output data for this event.
object
When this event started.
The status of the event.
The child execution identifier.
The type of workflow node.
The event subtype represented by this payload.
The workflow node identifier.
object
The execution origin subtype represented by this payload.
The workflow trigger identifier.
object
The execution origin subtype represented by this payload.
The workflow trigger identifier.
object
The source event type.
The external event identifier.
The source event provider.
The trigger identifier.
The execution origin subtype represented by this payload.
The execution detail subtype represented by this payload.
The workflow identifier.
The workflow implementation identifier.
When this execution ended.
Whether this execution is agentic.
Whether this execution belongs to a failed retry attempt.
Whether this execution has been purged.
The parent execution ID of this execution.
The responder ID of this execution.
When this execution started.
The status of the execution.
The workspace ID of this execution.
Example
{ "execution": { "detail": { "events": [ { "status": "running", "type": "iteration" } ], "origin": { "type": "api" }, "type": "agent-execution" }, "status": "running" }}Unauthorized.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Squad not found.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Flat collaboration mode is exclusive for chats.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}