Skip to main content
POST
/
runs
Create run
curl --request POST \
  --url https://api.ziet.ai/v1/runs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_id": "<string>",
  "input": {},
  "max_steps": 50,
  "max_tokens": 1001,
  "metadata": {}
}'
{
  "id": "<string>",
  "agent_id": "<string>",
  "status": "created",
  "input": {},
  "output": {},
  "max_steps": 123,
  "max_tokens": 123,
  "memory": {
    "id": "<string>",
    "run_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  },
  "steps": [
    {
      "id": "<string>",
      "type": "action",
      "status": "pending",
      "action_id": "<string>",
      "input": {},
      "output": {},
      "started_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z"
    }
  ],
  "error": {
    "message": "<string>",
    "code": "<string>"
  },
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Format: 'Api-Key sk_live_YOUR_KEY'

Body

application/json
agent_id
string
required
input
object
required
max_steps
integer
Required range: 1 <= x <= 100
max_tokens
integer
Required range: x >= 1000
metadata
object

Response

Run created

id
string
required
agent_id
string
required
status
enum<string>
required
Available options:
created,
running,
waiting_approval,
completed,
failed,
cancelled
created_at
string<date-time>
required
input
object
output
object
max_steps
integer
max_tokens
integer
memory
object
steps
object[]
error
object
metadata
object
started_at
string<date-time>
completed_at
string<date-time>