curl --request POST \
--url https://api.video2ctx.dev/v1/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.video2ctx.dev/v1/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.video2ctx.dev/v1/agent"
payload = { "message": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userMessageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentMessageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversationTurn": 2,
"modelStepCount": 1,
"toolCallCount": 1,
"status": "pending"
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}Start a durable agent run
Starts a new session when sessionId is omitted. Follow-up requests reuse the Durable Object selected by the supplied sessionId and inherit bounded memory from completed ancestor turns. Without parentMessageId, the latest completed assistant turn is selected automatically. The response is an asynchronous run receipt. Each accepted POST creates a new run. Retrieve existing work using the returned sessionId and runId, or find it in the session dashboard if the receipt was lost.
curl --request POST \
--url https://api.video2ctx.dev/v1/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.video2ctx.dev/v1/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.video2ctx.dev/v1/agent"
payload = { "message": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userMessageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentMessageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversationTurn": 2,
"modelStepCount": 1,
"toolCallCount": 1,
"status": "pending"
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}{
"error": {
"code": "QUERY_REQUIRED",
"message": "<string>",
"details": "<unknown>",
"requestId": "<string>"
}
}Authorizations
Permanent personal API key created in the dashboard. Example: curl -H "Authorization: Bearer aty_…" https://your-host/v1/projects
Query Parameters
Compact is the default: answer, deduplicated sources, outcome, and top-level billing. Use legacy explicitly for the previous detailed format. Applies only to this HTTP response. Does not change execution.
legacy, compact Optional comma-separated details: artifacts,evidence,diagnostics. Requires responseFormat=compact. Evidence sourceId points to result.sources[].id. Details are omitted unless requested.
100"evidence,diagnostics"
Body
1 - 10000Continue an existing agent session.
Deprecated request alias for sessionId. If both are supplied, they must match. Responses return only sessionId.
Optional completed assistant message to use as the parent. Omit it to continue from the latest completed turn.
Response
Agent run admitted. Compact receipts omit execution metadata unless diagnostics is requested.
- Option 1
- Option 2
Stable identifier assigned to the admitted user message.
Stable identifier reserved for the agent response.
One-based position of this user and assistant turn within the conversation.
x >= 1Completed model steps in the main Agent Core loop. Classifier, transcript analyst, repair, and timeout-finalizer calls are excluded.
x >= 0Persisted tool calls for this run, including completed, failed, and finalization calls.
x >= 0pending, running, completed, failed, cancelled