Tasks

Structured AI functions you can run standalone or compose into agents.

A Task is a structured AI function: a prompt plus typed inputs and a typed output, running on a model you choose. Agents call Tasks as tools, but Tasks are first-class over the API on their own — many integrations only ever call Run Task.

These endpoints let you create and version tasks, run them with typed input, list and inspect runs, and wire up the surrounding machinery: Task Forwarders (deliver task output to webhooks or email), Input Processors (pre-process input before a run), and Task Evals (offline evaluation).

All endpoints are scoped to an organization and project and require a bearer token or OAuth client credentials. See Authentication.

Key endpoints

POST
/api/v1/org/:org_id/project/:project_id/task/:task_id/run
1curl -X POST https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/task/task_id/run \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "task_input": {
6 "body": "I was billed twice for my Pro subscription on the 3rd and the 5th. Please refund the duplicate charge.",
7 "plan": "Pro",
8 "subject": "Charged twice this month"
9 }
10}'
MethodEndpointPurpose
POSTRun taskExecute a task; send input as task_input (not input_params).
POSTCreate taskCreate a task from a prompt, input schema, output schema, and model.
GETList task runsList a task’s runs; a project-wide variant lists runs across the project.
GETGet a task runFetch a single run with its output, timing, and cost.
GETGet taskFetch a task’s current configuration, including its input and output schemas.