Skip to main content
POST
/
orgs
/
{org_id}
/
projects
/
{project_id}
/
compose
cURL
curl --request POST \
  --url https://api.timbal.ai/orgs/{org_id}/projects/{project_id}/compose \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "Add error handling to the upload endpoint",
  "rev": "main",
  "effort": "high",
  "model": "sonnet",
  "session_id": "<string>"
}
'

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required
project_id
string
required

Body

application/json
prompt
string
required

The prompt to send to Claude

Example:

"Add error handling to the upload endpoint"

rev
string
required

Branch to run against (worktree is checked out at this rev)

Example:

"main"

effort
string | null

Effort level: low, medium, high, max

Example:

"high"

model
string | null

Model alias or full name (e.g. "sonnet", "opus", "claude-sonnet-4-6")

Example:

"sonnet"

session_id
string | null

Existing session ID to continue a conversation. Omit to start a new session.

Response

200 - text/event-stream

SSE stream of Claude responses