Skip to main content
POST
Run one headless agent turn

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

ID of the hosted project that contains the server.

Body

application/json
messages
object[]
required

The conversation so far, oldest first. The caller owns state and resends the full history each turn. Each message content is capped at 8,000 characters AND 8,192 UTF-8 bytes; the whole history is additionally capped at 98,304 UTF-8 bytes (96 KB).

Required array length: 1 - 50 elements

Response

The completed turn.

reply
string
required

The assistant's final text for this turn.

toolCalls
object[]
required
createdResources
object[]
required

Resources the turn created, with app deep links.

usage
object
required