Make HTTP requests to your API surface endpoints to invoke capabilities programmatically from any application.
API Surface endpoints follow this pattern:
The {capabilitySlug} is generated from the Capability name. For example, Summarize Article becomes summarize-article. Find your specific URLs in the API Surface’s Endpoints or Ship tab.
Send a POST request with your input data. The request body is passed directly as the capability’s input:
You can also enable streaming via a query parameter:
The request body for a dedicated capability endpoint is a JSON object. All fields are treated as input parameters for the capability. Optionally include an options object to control streaming:
Alternatively, use the generic /api/dispatch endpoint to specify the capability by name:
Non-streaming responses return the capability output directly as JSON. The exact shape depends on the response format configured on your API Surface:
Raw format (default) returns just the output:
Wrapped format includes metadata:
You can configure the response format in the Overview tab of your API Surface.
Streaming responses use Server-Sent Events (SSE). Each event has a named type:
If an error occurs during streaming:
Errors return appropriate HTTP status codes:
401 Unauthorized:
403 Forbidden:
404 Not Found:
429 Rate Limit Exceeded:
500 Internal Server Error:
Use the executionId to debug failures in execution logs.
API Surfaces enforce rate limits that can be configured per API key. You can set per-minute and per-day limits when creating keys in the Keys tab of your API Surface.