Skip to main content
POST
/
agents
/
{id}
/
execute

Endpoint

POST https://gateway.orkeia.ai/agents/{id}/execute

Headers

authorization:  <your_token>
Content-Type: application/json

Path Parameters

You must pass the agent id via query params
{
  "id": "Agent ID (required)"
}

Request body

{
  "agent": "agent id",
  "input": "prompt",
  "context": [{
    "role": ["user","assistant"],
    "content": "context content"
  }],
  "chatId": "chat id, if any",
  "files": "array of files, if any",
  "metadata": Metadata,
}
This request is our AgentPayload! If you have any questions about it, we recommend checking out this link.

Example (cURL)

curl -X POST "https://gateway.orkeia.ai/agents/agent123/execute" \
  -H "authorization:  <your_token>" \
  -H "Content-Type: application/json" \
  -d '{ "action": "process"}'

Responses

Response - Success

response
{
  "status": "OK",
  "data": { 
	"response" : "processing result", 
    "chatId": "chat id", 
    "file": "file path, if any"}
   }
}

500 — Bad Request

{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}

400 — Client Error

{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}