Skip to main content
POST
Run an Endpoint
  • 200: the Run has finished. Check its status, Provider response, and charge.
  • 202: an async Run is still in progress. Use Get a Run to check its result.
A finished Run can contain a Provider error. Use the same Idempotency-Key and execution parameters when retrying.

Headers

idempotency-key
string
required

Generate a unique value for each intended execution (a UUID is recommended). Retry with the same key and execution parameters to retrieve the original Run without a second charge. Changing execution parameters with the same key returns 409; changing task_id or metadata does not update the original Run.

Minimum string length: 1

Body

application/json
provider
string
required
Pattern: ^[a-z0-9][a-z0-9-]*$
endpoint
string
required
Pattern: ^\/.+$
input
object

Provider-native input. Build it from the input_schema returned by Inspect.

endpoint_version
integer | null

Select a supported version, or omit for the default. Compatible updates keep the version; unavailable or retired versions return 409. A version does not lock Price: new Runs use the Price at admission, and accepted Runs keep it through settlement.

Required range: x > 0
task_id
string | null

The task this run belongs to, from a catalog search response. Grouping only: it never affects routing, price or idempotency.

metadata

Optional tracking fields, returned on the Run and available as filters. They never go to the Provider or affect routing, Price, or idempotency.

  • Up to 20 keys: lowercase letters, digits, and underscores; start with a letter; at most 40 characters.
  • Values: strings of 1–500 characters.
  • user_id: your End user's opaque ID, never their email address or name.

Invalid entries are dropped whole, not truncated. The request continues, and the Run returns the fields that were stored.

Response

a terminal run: COMPLETED, FAILED or STOPPED

id
string
required
run_url
string
required

Open this Run in the console. Requires Workspace membership.

provider
string
required
Pattern: ^[a-z0-9][a-z0-9-]*$
endpoint
string
required
Pattern: ^\/.+$
endpoint_version
integer
required
status
enum<string>
required

QUEUED or RUNNING: still in progress. COMPLETED: a Provider response is available, including non-2xx responses. FAILED: read failure. STOPPED: stopped before dispatch. Read charge_usd separately from status.

Available options:
QUEUED,
RUNNING,
COMPLETED,
FAILED,
STOPPED
failure
object | null
required

Why the Run failed. Non-null only when status is FAILED.

input
object
required
output
any
required
provider_response
object | null
required

Non-null only when status is COMPLETED.

  • For 2xx responses, output contains Provider-native JSON (any shape), or null for an empty body.
  • For non-2xx responses, error contains the Provider's error body and output is null.

Sensitive fields are removed from both bodies.

charge_usd
string | null
required

Final charge as an exact USD decimal string. Null while QUEUED or RUNNING. A FAILED Run can have a non-zero charge under the Endpoint's Price.

Pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
charge_basis
object | null
required

Price clause used to calculate the charge. Null before settlement or when no Provider attempt was made.

stoppable
boolean
required

Whether a stop request can currently be accepted. This does not guarantee that the Run can stop before dispatch.

stop_requested_at
string<date-time> | null
required

When a stop was requested. The Run can still continue if dispatch had already started.

created_at
string<date-time>
required

ISO-8601 UTC timestamp

started_at
string<date-time> | null
required

ISO-8601 UTC timestamp

completed_at
string<date-time> | null
required

ISO-8601 UTC timestamp

task_id
string | null
required
metadata
object
required

Your stored tracking fields. Use them to filter Runs. They never go to the Provider or affect routing, Price, or idempotency.

  • Up to 20 keys: lowercase letters, digits, and underscores; start with a letter; at most 40 characters.
  • Values: strings of 1–500 characters.
  • user_id: your End user's opaque ID, never their email address or name.