Run a task
Run a task on an input and get JSON checked against its output schema. {name} is the task's name for its latest version, or name@n for version n. An answer that fails the schema is repaired once, as a second billed generation; a refusal or a cut-off answer is not.
bearerAuthAuthorizationBearer <token>Your API key, sent as Authorization: Bearer <key>.
name*stringThe task's name, optionally with @ and a version.
Idempotency-Key?stringAny string you choose. A retry with the same key and body returns the first result instead of running again. The same key with a different body is a 409 idempotency_conflict.
The input object itself, matching the task's input_schema.
application/json- body
The checked answer.
application/json- response
id*stringThe generation whose answer is output.
object*stringtask*stringThe task and version that ran, as name@n.
model*stringThe model that produced output.
output*The answer, valid against the task's output schema.
usage*Summed over every generation of the request.
op*curl -X POST "https://example.com/v1/tasks/sentiment" \ -H "Authorization: Bearer $OP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "The battery lasts all day, but the screen scratches easily." }'{ "id": "string", "object": "task.result", "task": "string", "model": "string", "output": {}, "usage": { "input_tokens": 0, "output_tokens": 0 }, "op": { "generations": [ "string" ] }}MCP endpoint POST
A Model Context Protocol server that offers your key's tasks and your tenant's presets as tools. Stateless: one JSON-RPC 2.0 request or notification per POST, answered as `application/json`, with no session. Supports protocol versions 2026-07-28, 2025-11-25 and 2025-06-18. A request that carries an `Origin` header is refused with 403. A tool call is served by the task or chat route and billed as that route is. Only served where the MCP flag is on.
Run a tool POST
Start a tool run. It answers `202` with the run, which you poll at `/v1/tools/runs/{id}`. The input is checked against the tool before anything is reserved.