import Cerca from '@cerca-dev/sdk';const client = new Cerca({ apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted});const turn = await client.threads.startTurn('agent_abc123', 'thread_abc123', { message: 'message',});console.log(turn.id);
import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
turn = client.threads.start_turn(
agent_id="agent_abc123",
thread_id="thread_abc123",
message="message",
)
print(turn.id)
require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
turn = cerca.threads.start_turn("agent_abc123", "thread_abc123", message: "message")
puts(turn)
cerca threads start-turn \
--api-key 'My API Key' \
--agent-id agent_abc123 \
--thread-id thread_abc123 \
--message message
import Cerca from '@cerca-dev/sdk';const client = new Cerca({ apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted});const turn = await client.threads.startTurn('agent_abc123', 'thread_abc123', { message: 'message',});console.log(turn.id);
import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
turn = client.threads.start_turn(
agent_id="agent_abc123",
thread_id="thread_abc123",
message="message",
)
print(turn.id)
require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
turn = cerca.threads.start_turn("agent_abc123", "thread_abc123", message: "message")
puts(turn)
cerca threads start-turn \
--api-key 'My API Key' \
--agent-id agent_abc123 \
--thread-id thread_abc123 \
--message message
Per-turn tool subset. Omit to inherit the thread's current tools; pass [] to run this turn with no configurable tools. Provided entries can only narrow the agent/thread effective tools.
Configurable runtime tool name, configurable namespace wildcard such as sandbox., or external namespace wildcard such as google.. At thread and turn scope, entries can only narrow the agent's effective tools.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cerca","description":"Build long-running agents on Cloudflare Workers with durable execution, custom tools, approvals, memory, and a cloud sandbox.","colors":{"primary":"#7C6340","light":"#E8E0D2","dark":"#7C6340"},"logo":{"light":"https://mintcdn.com/cerca/avU2YjV-ayl9ITnW/logo/light.svg?fit=max\u0026auto=format\u0026n=avU2YjV-ayl9ITnW\u0026q=85\u0026s=3a952f50a305b017db4af3b52443e78d","dark":"https://mintcdn.com/cerca/avU2YjV-ayl9ITnW/logo/dark.svg?fit=max\u0026auto=format\u0026n=avU2YjV-ayl9ITnW\u0026q=85\u0026s=f30eef939f273f15687674dc8671f91a","href":"https://docs.cerca.dev"},"favicon":"https://mintcdn.com/cerca/avU2YjV-ayl9ITnW/favicon.svg?fit=max\u0026auto=format\u0026n=avU2YjV-ayl9ITnW\u0026q=85\u0026s=5c0a8c9a4b99f21be8bf0fa07e2d420e","background":{"color":{"light":"#FFFDF8","dark":"#141008"}},"navbar":{"links":[{"href":"https://app.cerca.dev/sign-in","label":"Sign in"}],"primary":{"type":"button","label":"Get an API key","href":"https://app.cerca.dev/settings"}},"footer":{"socials":{"github":"https://github.com/matrices"}},"seo":{"indexing":"navigable"},"icons":{"library":"lucide"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"list","href":"/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cerca","hasAudioNarration":false,"actualSubdomain":"cerca","customDomains":["docs.cerca.dev"],"gitSource":{"type":"github","owner":"matrices","repo":"cell","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21ddd929c7042dd5f5fa13","collectionId":"ba226a70-e5d2-440b-8ce9-16ef02e5ae18","schemaVersion":"v2"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a303907bbaa514ac1c6776e:failure","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"API Reference","count":66},{"language":"default","tag":"Guides","count":17},{"language":"default","tag":"Threads","count":10},{"language":"default","tag":"Concepts","count":9},{"language":"default","tag":"Core concepts","count":9},{"language":"default","tag":"Agents","count":7},{"language":"default","tag":"Events","count":7},{"language":"default","tag":"Webhooks","count":7},{"language":"default","tag":"Approvals","count":6},{"language":"default","tag":"Connections","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/threads/create-turn","slug":"/api-reference/threads/create-turn","pageMetadata":{"title":"Create turn","description":null,"deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/turns","href":"/api-reference/threads/create-turn","autogeneratedByOpenApi":true},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create turn","description":null,"deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/turns","href":"/api-reference/threads/create-turn","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"security":["df1f5766-1990-42b8-be8a-09a7cbcb1f10"],"tags":["Threads"],"parameters":["6934f55f-59e8-47dd-9855-e50718ad151f","052e0cc6-fe2c-4fc5-ad36-c2936f534a80"],"requestBody":"29a80ed8-a7f4-44bf-8a69-a55dee07a629","responses":{"201":"082dd84f-cf40-48ad-8871-c7dc674cb846","400":"79e914db-8655-449a-b68d-cd568e03ee50","401":"45a74dad-e84a-427f-b9e7-6df2b2bf1b8e","403":"2a745a56-c0cd-48d2-a695-bd4fff8de036","404":"76e81275-56f9-43fc-9a1f-6370a6c742f5","409":"c515f32a-9d68-47e1-9321-4c298aad10f9","429":"78e3ce5e-50a9-4fff-b279-678eee4b7cc1","500":"957aec37-2554-42b9-a829-785cfea3393d","503":"c75f32d2-fe82-4753-8fe7-987dddc73d47","default":"e27f415e-7c53-4434-8327-bda9604957bc"},"summary":"Create turn","x-codeSamples":[{"lang":"JavaScript","source":"import Cerca from '@cerca-dev/sdk';\n\nconst client = new Cerca({\n apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted\n});\n\nconst turn = await client.threads.startTurn('agent_abc123', 'thread_abc123', {\n message: 'message',\n});\n\nconsole.log(turn.id);"},{"lang":"Python","source":"import os\nfrom cerca import Cerca\n\nclient = Cerca(\n api_key=os.environ.get(\"CERCA_API_KEY\"), # This is the default and can be omitted\n)\nturn = client.threads.start_turn(\n agent_id=\"agent_abc123\",\n thread_id=\"thread_abc123\",\n message=\"message\",\n)\nprint(turn.id)"},{"lang":"Go","source":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/matrices/cerca-go\"\n\t\"github.com/matrices/cerca-go/option\"\n)\n\nfunc main() {\n\tclient := cercago.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tturn, err := client.Threads.StartTurn(\n\t\tcontext.TODO(),\n\t\t\"agent_abc123\",\n\t\t\"thread_abc123\",\n\t\tcercago.ThreadStartTurnParams{\n\t\t\tMessage: cercago.F(\"message\"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", turn.ID)\n}\n"},{"lang":"Ruby","source":"require \"cerca\"\n\ncerca = Cerca::Client.new(api_key: \"My API Key\")\n\nturn = cerca.threads.start_turn(\"agent_abc123\", \"thread_abc123\", message: \"message\")\n\nputs(turn)"},{"lang":"CLI","source":"cerca threads start-turn \\\n --api-key 'My API Key' \\\n --agent-id agent_abc123 \\\n --thread-id thread_abc123 \\\n --message message"}],"method":"post","type":"path","servers":["d2b2aefa-8204-4fa4-b0ac-351a68bfe8fe"],"path":"/agents/{agentId}/threads/{threadId}/turns","baseUrlOptions":["https://api.cerca.dev"],"title":"Create turn","description":"","codeSamples":[{"lang":"JavaScript","source":"import Cerca from '@cerca-dev/sdk';\n\nconst client = new Cerca({\n apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted\n});\n\nconst turn = await client.threads.startTurn('agent_abc123', 'thread_abc123', {\n message: 'message',\n});\n\nconsole.log(turn.id);"},{"lang":"Python","source":"import os\nfrom cerca import Cerca\n\nclient = Cerca(\n api_key=os.environ.get(\"CERCA_API_KEY\"), # This is the default and can be omitted\n)\nturn = client.threads.start_turn(\n agent_id=\"agent_abc123\",\n thread_id=\"thread_abc123\",\n message=\"message\",\n)\nprint(turn.id)"},{"lang":"Go","source":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/matrices/cerca-go\"\n\t\"github.com/matrices/cerca-go/option\"\n)\n\nfunc main() {\n\tclient := cercago.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tturn, err := client.Threads.StartTurn(\n\t\tcontext.TODO(),\n\t\t\"agent_abc123\",\n\t\t\"thread_abc123\",\n\t\tcercago.ThreadStartTurnParams{\n\t\t\tMessage: cercago.F(\"message\"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", turn.ID)\n}\n"},{"lang":"Ruby","source":"require \"cerca\"\n\ncerca = Cerca::Client.new(api_key: \"My API Key\")\n\nturn = cerca.threads.start_turn(\"agent_abc123\", \"thread_abc123\", message: \"message\")\n\nputs(turn)"},{"lang":"CLI","source":"cerca threads start-turn \\\n --api-key 'My API Key' \\\n --agent-id agent_abc123 \\\n --thread-id thread_abc123 \\\n --message message"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"6934f55f-59e8-47dd-9855-e50718ad151f":{"schema":{"type":"string","minLength":1,"example":"agent_abc123","isRequired":true,"uniqueKey":"","typeLabel":"string"},"required":true,"in":"path","name":"agentId"},"052e0cc6-fe2c-4fc5-ad36-c2936f534a80":{"schema":{"type":"string","minLength":1,"example":"thread_abc123","isRequired":true,"uniqueKey":"","typeLabel":"string"},"required":true,"in":"path","name":"threadId"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"},"tools":{"type":"array","items":{"type":"string","minLength":1,"description":"Configurable runtime tool name, configurable namespace wildcard such as sandbox.*, or external namespace wildcard such as google.*. At thread and turn scope, entries can only narrow the agent's effective tools.","examples":["sandbox.*","memory.read","google.*"],"uniqueKey":"tools.items.[INDEX]","typeLabel":"string"},"description":"Per-turn tool subset. Omit to inherit the thread's current tools; pass [] to run this turn with no configurable tools. Provided entries can only narrow the agent/thread effective tools.","uniqueKey":"tools","typeLabel":"string[]"}},"required":["message"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","model":"\u003cstring>","tools":["sandbox.*"]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"082dd84f-cf40-48ad-8871-c7dc674cb846":{"description":"Thread turn started.","content":{"application/json":{"schema":{"type":"object","properties":{"completedAt":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"completedAt.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"completedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"completedAt","typeLabel":"string | null"},"endMessageSeq":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"endMessageSeq.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"endMessageSeq.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"endMessageSeq","typeLabel":"number | null"},"error":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error","typeLabel":"string | null"},"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"result":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"result.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"result","typeLabel":"string | null"},"seq":{"type":"number","isRequired":true,"uniqueKey":"seq","typeLabel":"number"},"startMessageSeq":{"type":"number","isRequired":true,"uniqueKey":"startMessageSeq","typeLabel":"number"},"startedAt":{"type":"string","isRequired":true,"uniqueKey":"startedAt","typeLabel":"string"},"status":{"type":"string","enum":["running","completed","failed"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"threadId":{"type":"string","isRequired":true,"uniqueKey":"threadId","typeLabel":"string"},"tokenUsage":{"oneOf":[{"type":"object","properties":{"inputTokens":{"type":"number","isRequired":true,"uniqueKey":"tokenUsage.oneOf.0.inputTokens","typeLabel":"number"},"outputTokens":{"type":"number","isRequired":true,"uniqueKey":"tokenUsage.oneOf.0.outputTokens","typeLabel":"number"}},"required":["inputTokens","outputTokens"],"isRequired":true,"uniqueKey":"tokenUsage.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"}},"required":["inputTokens","outputTokens"],"isRequired":true,"uniqueKey":"tokenUsage.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"tokenUsage","typeLabel":"object | null"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["completedAt","endMessageSeq","error","id","result","seq","startMessageSeq","startedAt","status","threadId","tokenUsage","message"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"completedAt":"\u003cstring>","endMessageSeq":123,"error":"\u003cstring>","id":"\u003cstring>","result":"\u003cstring>","seq":123,"startMessageSeq":123,"startedAt":"\u003cstring>","status":"running","threadId":"\u003cstring>","tokenUsage":{"inputTokens":123,"outputTokens":123},"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"79e914db-8655-449a-b68d-cd568e03ee50":{"description":"Invalid runtime request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"45a74dad-e84a-427f-b9e7-6df2b2bf1b8e":{"description":"Authentication required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"2a745a56-c0cd-48d2-a695-bd4fff8de036":{"description":"Access denied or non-transient quota exceeded. Limit errors include a stable code field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"76e81275-56f9-43fc-9a1f-6370a6c742f5":{"description":"Runtime resource not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"c515f32a-9d68-47e1-9321-4c298aad10f9":{"description":"Thread lifecycle conflict.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"78e3ce5e-50a9-4fff-b279-678eee4b7cc1":{"description":"Transient capacity limit exceeded. Limit errors include a stable code field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"957aec37-2554-42b9-a829-785cfea3393d":{"description":"Thread lifecycle operation failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"c75f32d2-fe82-4753-8fe7-987dddc73d47":{"description":"Required runtime dependency unavailable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"},"e27f415e-7c53-4434-8327-bda9604957bc":{"description":"Runtime error response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","description":"Stable machine-readable error code when the API can provide one.","example":"MONTHLY_TOKEN_BUDGET_EXCEEDED","uniqueKey":"code","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","code":"MONTHLY_TOKEN_BUDGET_EXCEEDED"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"df1f5766-1990-42b8-be8a-09a7cbcb1f10":{"bearerAuth":{"bearerFormat":"Cerca API key","scheme":"bearer","type":"http","scopes":[]}}},"servers":{"d2b2aefa-8204-4fa4-b0ac-351a68bfe8fe":{"url":"https://api.cerca.dev"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"Cerca API key","scheme":"bearer","type":"http","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml"},"subdomain":"cerca","siteName":"Cerca","title":"Create turn - Cerca","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-13T04:07:01.850Z","originalFileLocation":"api-reference/threads/create-turn.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Cerca\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create turn - Cerca\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cerca\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cerca.dev/api-reference/threads/create-turn\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cerca.mintlify.app/_mintlify/api/og/v2?division=Threads\u0026amp;title=Create+turn\u0026amp;theme=fc49af25e83b722074099bcb\u0026amp;signature=ec4f8711f66d26d9ee12104e24f51288d44e30920bb710c5272d52606efb8aeb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create turn - Cerca\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cerca.mintlify.app/_mintlify/api/og/v2?division=Threads\u0026amp;title=Create+turn\u0026amp;theme=fc49af25e83b722074099bcb\u0026amp;signature=ec4f8711f66d26d9ee12104e24f51288d44e30920bb710c5272d52606efb8aeb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cerca/U1XT9hQUrE53iVjp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cerca\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7C6340\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cerca.dev/api-reference/threads/create-turn\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/threads/create-turn.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cerca.dev/#organization\",\"name\":\"Cerca\",\"url\":\"https://docs.cerca.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cerca/avU2YjV-ayl9ITnW/logo/light.svg?fit=max\u0026auto=format\u0026n=avU2YjV-ayl9ITnW\u0026q=85\u0026s=3a952f50a305b017db4af3b52443e78d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cerca.dev#website\",\"name\":\"Cerca\",\"url\":\"https://docs.cerca.dev\",\"publisher\":{\"@id\":\"https://docs.cerca.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cerca.dev/api-reference/threads/create-turn#webpage\",\"url\":\"https://docs.cerca.dev/api-reference/threads/create-turn\",\"name\":\"Create turn\",\"dateModified\":\"2026-05-13T04:07:01.850Z\",\"isPartOf\":{\"@id\":\"https://docs.cerca.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cerca.dev/api-reference/threads/create-turn#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cerca.dev/api-reference/threads/create-turn#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Threads\",\"item\":\"https://docs.cerca.dev/api-reference/threads/list-threads\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create turn\",\"item\":\"https://docs.cerca.dev/api-reference/threads/create-turn\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.cerca.dev/api-reference/threads/create-turn#apireference\",\"headline\":\"Create turn\",\"name\":\"Create turn\",\"url\":\"https://docs.cerca.dev/api-reference/threads/create-turn\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cerca.dev/api-reference/threads/create-turn#webpage\"},\"dateModified\":\"2026-05-13T04:07:01.850Z\",\"publisher\":{\"@id\":\"https://docs.cerca.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cerca.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cerca\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Cerca","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"list","href":"/changelog"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API Reference","icon":"square-terminal","groups":[{"group":"Auth","pages":[{"title":"Retrieve context","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /auth/context","href":"/api-reference/auth/retrieve-context"},{"title":"List fleets","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /auth/fleets","href":"/api-reference/auth/list-fleets"}]},{"group":"OAuth","pages":[{"title":"Start OAuth authorization","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /oauth/connect/{provider}","href":"/api-reference/oauth/start-oauth-authorization"}]},{"group":"Connections","pages":[{"title":"Create API key","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /connections/api-keys","href":"/api-reference/connections/create-api-key"},{"title":"List connections","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /connections","href":"/api-reference/connections/list-connections"},{"title":"Delete connection","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /connections/{connectionId}","href":"/api-reference/connections/delete-connection"},{"title":"List connections","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/connections","href":"/api-reference/connections/list-connections-1"},{"title":"Attach connection","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/connections","href":"/api-reference/connections/attach-connection"},{"title":"Detach connection","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /agents/{agentId}/connections/{connectionId}","href":"/api-reference/connections/detach-connection"}]},{"group":"Tools","pages":[{"title":"List tools","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /fleets/{fleetId}/tools","href":"/api-reference/tools/list-tools"},{"title":"Create tool","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /fleets/{fleetId}/tools","href":"/api-reference/tools/create-tool"},{"title":"Retrieve tool source","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /fleets/{fleetId}/tools/{sourceId}","href":"/api-reference/tools/retrieve-tool-source"},{"title":"Update tool source","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml put /fleets/{fleetId}/tools/{sourceId}","href":"/api-reference/tools/update-tool-source"},{"title":"Delete tool source","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /fleets/{fleetId}/tools/{sourceId}","href":"/api-reference/tools/delete-tool-source"},{"title":"List tools","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/tools","href":"/api-reference/tools/list-tools-1"}]},{"group":"Webhooks","pages":[{"title":"List webhooks","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /fleets/{fleetId}/webhooks","href":"/api-reference/webhooks/list-webhooks"},{"title":"Create webhook","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /fleets/{fleetId}/webhooks","href":"/api-reference/webhooks/create-webhook"},{"title":"Retrieve webhook","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /fleets/{fleetId}/webhooks/{webhookId}","href":"/api-reference/webhooks/retrieve-webhook"},{"title":"Update webhook","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml put /fleets/{fleetId}/webhooks/{webhookId}","href":"/api-reference/webhooks/update-webhook"},{"title":"Delete webhook","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /fleets/{fleetId}/webhooks/{webhookId}","href":"/api-reference/webhooks/delete-webhook"},{"title":"Rotate webhook secret","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /fleets/{fleetId}/webhooks/{webhookId}/rotate","href":"/api-reference/webhooks/rotate-webhook-secret"},{"title":"Send test webhook","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /fleets/{fleetId}/webhooks/{webhookId}/test","href":"/api-reference/webhooks/send-test-webhook"}]},{"group":"Agents","pages":[{"title":"List agents","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents","href":"/api-reference/agents/list-agents"},{"title":"Create agent","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents","href":"/api-reference/agents/create-agent"},{"title":"Retrieve agent","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}","href":"/api-reference/agents/retrieve-agent"},{"title":"Update agent","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml put /agents/{agentId}","href":"/api-reference/agents/update-agent"},{"title":"Delete agent","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /agents/{agentId}","href":"/api-reference/agents/delete-agent"},{"title":"Retrieve config","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/config","href":"/api-reference/agents/retrieve-config"},{"title":"Update metadata","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml patch /agents/{agentId}/metadata","href":"/api-reference/agents/update-metadata"}]},{"group":"Context","pages":[{"title":"List context entries","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/context","href":"/api-reference/context/list-context-entries"},{"title":"Retrieve context entry","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/context/entry","href":"/api-reference/context/retrieve-context-entry"},{"title":"Update context entry","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml put /agents/{agentId}/context/entry","href":"/api-reference/context/update-context-entry"},{"title":"Delete context entry","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /agents/{agentId}/context/entry","href":"/api-reference/context/delete-context-entry"},{"title":"Search context","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/context/search","href":"/api-reference/context/search-context"}]},{"group":"Schedules","pages":[{"title":"List schedules","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/schedules","href":"/api-reference/schedules/list-schedules"},{"title":"Create schedule","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/schedules","href":"/api-reference/schedules/create-schedule"},{"title":"Update schedule","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml put /agents/{agentId}/schedules/{scheduleId}","href":"/api-reference/schedules/update-schedule"},{"title":"Delete schedule","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /agents/{agentId}/schedules/{scheduleId}","href":"/api-reference/schedules/delete-schedule"},{"title":"Trigger schedule","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/schedules/{scheduleId}/trigger","href":"/api-reference/schedules/trigger-schedule"}]},{"group":"Threads","pages":[{"title":"List threads","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads","href":"/api-reference/threads/list-threads"},{"title":"Create thread","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads","href":"/api-reference/threads/create-thread"},{"title":"Retrieve thread","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}","href":"/api-reference/threads/retrieve-thread"},{"title":"List thread messages","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}/messages","href":"/api-reference/threads/list-thread-messages"},{"title":"Get thread activity","description":"Fetch compact current and recent activity for a thread without returning transcript content or runtime debug state.","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}/activity","href":"/api-reference/threads/get-thread-activity"},{"title":"Create turn","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/turns","href":"/api-reference/threads/create-turn"},{"title":"Steer thread","description":"Steer a thread with another user message. Steering a closed thread returns a conflict; steering a running or awaiting thread queues the message.","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/steer","href":"/api-reference/threads/steer-thread"},{"title":"Cancel thread","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/cancel","href":"/api-reference/threads/cancel-thread"},{"title":"Close thread","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/close","href":"/api-reference/threads/close-thread"},{"title":"Compact thread","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/compact","href":"/api-reference/threads/compact-thread"}]},{"group":"Approvals","pages":[{"title":"List approvals","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/approvals","href":"/api-reference/approvals/list-approvals"},{"title":"List approval grants","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/approval-grants","href":"/api-reference/approvals/list-approval-grants"},{"title":"Delete approval grant","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /agents/{agentId}/approval-grants/{grantId}","href":"/api-reference/approvals/delete-approval-grant"},{"title":"List approval grants","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}/approval-grants","href":"/api-reference/approvals/list-approval-grants-1"},{"title":"Delete approval grant","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml delete /agents/{agentId}/threads/{threadId}/approval-grants/{grantId}","href":"/api-reference/approvals/delete-approval-grant-1"},{"title":"Create approval","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/threads/{threadId}/approvals/{approvalId}","href":"/api-reference/approvals/create-approval"}]},{"group":"Sandbox","pages":[{"title":"Execute sandbox command","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/sandbox/exec","href":"/api-reference/sandbox/execute-sandbox-command"},{"title":"Write sandbox file","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/sandbox/write","href":"/api-reference/sandbox/write-sandbox-file"},{"title":"Read sandbox file","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml post /agents/{agentId}/sandbox/read","href":"/api-reference/sandbox/read-sandbox-file"}]},{"group":"Events","pages":[{"title":"List events","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /fleets/{fleetId}/events","href":"/api-reference/events/list-events"},{"title":"List events","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/events","href":"/api-reference/events/list-events-1"},{"title":"List events","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}/events","href":"/api-reference/events/list-events-2"},{"title":"Fleet event stream","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /fleets/{fleetId}/events/stream","href":"/api-reference/events/fleet-event-stream"},{"title":"Agent event stream","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/events/stream","href":"/api-reference/events/agent-event-stream"},{"title":"Thread event stream","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}/events/stream","href":"/api-reference/events/thread-event-stream"},{"title":"Thread message stream","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/threads/{threadId}/stream","href":"/api-reference/events/thread-message-stream"}]},{"group":"Models","pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /models","href":"/api-reference/models/list-models"}]}]}]},"title":"Create turn - Cerca","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","Page-kQh739Uz.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}