Create a task
Starts a background task for the Jobbit agent and returns at once with status 202; follow it with GET /v1/agent-tasks/{task_id} or the event stream. Repeating the call with the same idempotency_key and body returns the first task with status 200. Handing files to the task needs files:read as well, and the task’s credit budget is held on the key until it is settled to the real cost. A key limited to some workspaces may only use those.
Requires the agent:write permission.
Authorizations
An API key from Settings → API keys, sent as Authorization: Bearer jb_live_…
Body
What to do and when the job counts as done.
1 - 4000Data for the task, up to 256 KiB of JSON. The agent treats it as data, not as instructions.
Ids of files from POST /v1/files, up to 20. The key also needs files:read.
201 - 64A JSON Schema (draft 2020-12, up to 64 KiB) the result must follow. The task fails with invalid_output if the agent cannot meet it.
A project to run the task in. You need to be an editor of it.
64A model id, such as jobbit/pro. Defaults to the default for the account's plan.
100How hard the agent thinks.
none, low, medium, high, xhigh, max fail: the agent decides for itself. ask: it may stop with a question and wait in waiting_input.
fail, ask Repeating a create with the same key and the same body returns the first task; the same key with a different body is a conflict.
1 - 200Your own labels, up to 4 KiB. They are stored on the task and returned unchanged.
Response
The task was created. A repeated idempotency_key returns the existing task with status 200 instead.
The task id.
Where the task is.
queued, running, waiting_input, succeeded, failed, cancelled Why the task is in this state: completed, cancelled, question, invalid_output, budget_exceeded, timed_out, goal_unreachable, worker_stopped, insufficient_credits or run_failed.
Whether the agent reports that the goal was met.
The result following your output_schema. Only set when the task succeeded and a schema was given.
The agent's final answer as text.
Files the agent made.
Ids of the files handed to the task.
What went wrong, for a failed task.
The id of the chat in the Jobbit app where the work happens.
The workspace key, if one was given.
The model the task runs on.
The effort level.
Whether the task may ask questions.
fail, ask The open question, while the status is waiting_input.
How many questions the task has asked.
The most credits the task may spend.
Your source labels.
When the task was created.
When it started running.
When it finished.