codai · Schema
Agent run
Poll view of a persisted run (`GET /v1/agents/runs/{id}`).
CompanyArtificial IntelligenceCode GenerationDeveloper ToolsLLM GatewayOpenAI-CompatibleModel RoutingRomania
Properties
| Name | Type | Description |
|---|---|---|
| id | string | |
| status | object | |
| task | string | The submitted goal, verbatim. |
| model | stringnull | Requested model alias (`codai` when omitted at submit). |
| result | stringnull | Final answer; set only once `status` is `completed`. |
| error | stringnull | Failure message (≤ 2000 chars); set only when `status` is `failed`. |
| step_count | integer | Loop steps executed so far. Not incremented by the current executor. |
| usage | object | |
| created_at | string | |
| started_at | stringnull | When execution was claimed; `null` while `queued`. |
| finished_at | stringnull | Set on `completed`, `failed` and `cancelled`. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-agent-run-schema.json",
"title": "Agent run",
"description": "Poll view of a persisted run (`GET /v1/agents/runs/{id}`).",
"x-generated": "2026-11-10",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/codai-ro-agents-api-openapi.yml#/components/schemas/AgentRun",
"type": "object",
"required": [
"id",
"status",
"task",
"model",
"result",
"error",
"step_count",
"usage",
"created_at",
"started_at",
"finished_at"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"status": {
"$ref": "#/$defs/AgentRunStatus"
},
"task": {
"type": "string",
"description": "The submitted goal, verbatim."
},
"model": {
"type": [
"string",
"null"
],
"description": "Requested model alias (`codai` when omitted at submit)."
},
"result": {
"type": [
"string",
"null"
],
"description": "Final answer; set only once `status` is `completed`."
},
"error": {
"type": [
"string",
"null"
],
"description": "Failure message (≤ 2000 chars); set only when `status` is `failed`."
},
"step_count": {
"type": "integer",
"minimum": 0,
"description": "Loop steps executed so far. Not incremented by the current executor."
},
"usage": {
"$ref": "#/$defs/AgentUsage"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"started_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "When execution was claimed; `null` while `queued`."
},
"finished_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Set on `completed`, `failed` and `cancelled`."
}
},
"$defs": {
"AgentRunStatus": {
"type": "string",
"description": "Run lifecycle — `queued` → `running` → one of `completed`, `failed`, `cancelled`.",
"enum": [
"queued",
"running",
"completed",
"failed",
"cancelled"
]
},
"AgentUsage": {
"type": "object",
"title": "Token usage",
"description": "Aggregate token counts for the whole run.",
"required": [
"prompt_tokens",
"completion_tokens"
],
"properties": {
"prompt_tokens": {
"type": "integer",
"minimum": 0
},
"completion_tokens": {
"type": "integer",
"minimum": 0
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/codai-ro-agent-run"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.