Task API

Open in CMS

The Task API screen lets your own systems use this agent as a single-task worker: send one input over REST with an API key and get the full result back in the response. Found in the agent sidebar under Channels → Task API. It works for service agents only; on a personal agent the controls stay off.

The page has three tabs: Access, Settings, and Test. The switch and the keys apply at once. Changes on the Settings tab apply to new tasks a few seconds after you save, without publishing. Calls run the published agent, so changes to the agent itself go live when you publish it.

Access tab

API switchOff by default. When off, every call is refused, even with a valid key. Switching it off takes effect within seconds.
EndpointThe address your system POSTs a task to, with this agent's ID filled in.
Code samplesReady-to-adapt examples in Node.js, C#, Python, and Java.
Keep the key on your serverCall the API only from your own back end, never from a browser or a mobile app.

Primary and Secondary keys

Two slots, so you can rotate keys without downtime.

Create keyMakes a key that starts with qta_. Choose an Expiry: 7, 14, 30, 90, 180, or 365 days, or none.
Copy your new keyShown once after a key is made. Copy it before you close: the key cannot be shown again.
RevokeStops the key within seconds. A revoked key cannot be turned back on.

Settings tab

Additional promptTask instructions added to every call, up to 20,000 characters. They take precedence over the agent's other instructions when they conflict. The request's input is the data the task works on.
Response formatMarkdown (default), Plain text (no Markdown), JSON (one JSON object, also returned parsed in result), or JSON schema (one object that must match your schema; validated, with one automatic repair attempt).
JSON schemaShown for the JSON schema format. Root must be "type": "object", up to 20,000 characters. Generate from example builds a schema from example JSON. See Response formats for the supported keywords.
Include personalityAdds the agent's personality to the task instructions. Off by default.
Include interaction styleAdds the agent's interaction style. Off by default.
Include missionAdds the agent's mission. On by default.
Use knowledgeLets the agent search its knowledge. On by default.
Use toolsLets the agent use plugins, MCP servers, custom APIs, web search, and skills. On by default.
Keep tasks for7, 30 (default), or 90 days. Task conversations are deleted after this period.

Test tab

Runs a task from the CMS without a key, on the draft agent, using the settings as they are in the form (also before saving). Tests are billed like Preview chats.

InputThe data for the task, like the request's input.
OutputThe result as text.
ResultThe parsed JSON object, for the JSON and JSON schema formats.
ValidationWhether the result matches the schema, and what did not match.
Tools calledThe tools the agent used during the task.
RepairWhether an automatic repair was needed to match the schema.

Related guide: Task API