Skip to main content
POST
Run a tool

Authorizations

Authorization
string
header
required

A workspace API key from Settings → Developers → API keys, sent as Authorization: Bearer sk_… (or X-API-Key: sk_…). It acts as one workspace member and uses the workspace's credits.

Headers

Idempotency-Key
string
required

One value per logical operation, for example a UUID you generate and keep. 8 to 200 characters: letters, digits and . _ : ~ + / = -. Reuse it on every retry of that operation; a new key runs the tool again.

Required string length: 8 - 200

Path Parameters

toolId
string
required

The tool's id, exactly as search returns it, URL-encoded once (a / becomes %2F).

Body

application/json
input
object
required

The tool's inputs, as described by its inputSchema.

webhook
string<uri>

An https URL, at most 2,048 characters once encoded, whose host resolves to a public internet address. When the call ends, Connie POSTs a signed tool_invocation.* event to it. See the webhook in this reference.

Maximum string length: 2048

Response

The call ended within the wait and the tool succeeded (ok: true). A tool that ran and failed answers 400 with tool_failed.

status
enum<string>
required

completed: the tool ran (ok says whether it succeeded). in_progress: still running. not_executed: nothing ran and nothing was charged. unknown_outcome: the tool may have run; do not run it again automatically.

Available options:
completed,
in_progress,
not_executed,
unknown_outcome
ok
boolean
required
invocationId
string<uuid>

The operation's id. Keep it.

toolId
string
result
any

The tool's output, when ok is true and it is under 1 MiB.

resultRef
object

Present instead of result when the output is over 1 MiB. Fetch it with ?result=full.

error
object
billing
object
replayed
boolean

true when this answer repeats an earlier request with the same key. Always false when polling an operation.

chargedThisRequest
number

Credits charged by this request; 0 on a replay.

recovery
object

For media generation only: how to recover the result of an unknown_outcome.