Skip to content

Invoke Service

POST/v1/services/{service_id}/invoke

Start a Run and return 202 Accepted with the Run. Idempotency-Key is required: the same key and body return the original Run, a different body returns 409. Only one Run per Service can be pending; another invoke returns 429 concurrency_limit. Poll GET /v1/services/{service_id}/runs/{run_id} until status leaves pending, then read the result from the Session in session_id.

Path parameters

stringservice_idrequired

Service ID (svc_ prefix).

Headers

stringIdempotency-Keyrequired

1-128 characters, no leading or trailing whitespace. Reuse the same key and body when retrying; the same key with a different body returns 409.

Request body

JSON object. Send {} to use the saved input.

Optional<string>input

Overrides the saved input for this Run. The effective input must be non-empty.

Optional<string>model

Overrides the saved model for this Run.

Optional<object>model_provider

Model credential for this Run. Omit to use your calling API key.