Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

An Onecortex API key, oc_live_..., from API keys in the dashboard.

Path Parameters

agentId
string
required

The agent's ID, from its page in the dashboard.

Example:

"agt_01K0000000000000000000000"

Body

application/json

At most 1 MB. Any other field reaches the agent unchanged, as params.

prompt
string
required

The input to the agent.

sessionId
string

Your key for a conversation. Calls with the same one reach the same running instance. Generated when absent.

Required string length: 1 - 256
stream
boolean

True for server sent events. Absent, the Accept header decides.

messages
object[]

The conversation as you hold it, for an agent that reads history.

metadata
object

Anything the agent should see, at most 4 KB as JSON. Reaches the agent in params.

Response

The run completed. JSON, or a stream of events.

status
enum<string>
required
Available options:
completed,
failed
result
string
required

The whole reply. On a failed run, the text sent before it failed.

events
object[]
required

The tool calls, tool results and steps, in order. Text is in result.

One event of a run. Every event carries v, which is 1, and type.

sessionId
string
required
agentId
string
required
versionNumber
integer
required
requestId
string
required
durationMs
integer
required
error
object

Present when status is failed.

Last modified on September 28, 2026