GET
/
api
/
v1
/
threads
/
{threadId}
/
runs
curl --request GET \
  --url https://itz.am/api/v1/threads/{threadId}/runs \
  --header 'Api-Key: <api-key>'
{
  "runs": [
    {
      "id": "run_1234567890",
      "origin": "SDK",
      "status": "COMPLETED",
      "input": "Who are you?",
      "output": "I'm a helpful assistant",
      "prompt": "Be friendly and helpful",
      "inputTokens": 100,
      "outputTokens": 100,
      "cost": "0.001",
      "durationInMs": 100,
      "threadId": "thread_1234567890",
      "model": {
        "name": "GPT-4o",
        "tag": "openai:gpt-4o"
      },
      "attachments": [
        {
          "url": "https://example.com/image.jpg",
          "mimeType": "image/jpeg",
          "id": "attachment_1234567890"
        }
      ],
      "knowledge": [
        {
          "id": "1353151353531",
          "title": "My Resource",
          "url": "https://example.com/resource.pdf",
          "type": "file"
        }
      ],
      "workflowId": "workflow_1234567890",
      "createdAt": "2021-01-01T00:00:00.000Z"
    }
  ]
}

Authorizations

Api-Key
string
header
required

The API key to use for authentication

Path Parameters

threadId
string
required

The ID of the thread to get runs for

Example:

"thread_1234567890"

Response

200
application/json

Successfully retrieved thread runs

The response is of type object.