Executions

Create an execution

POST/v1/applications/{applicationId}/executions

Starts an execution on the connection identified by your bearer access token and returns it as QUEUED. Send Idempotency-Key (1–255 characters) and reuse it with the same request body and connection on retries to retrieve the original execution. The same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED. If the connection needs the user to sign in again, you'll get 409 CONNECTION_REAUTHORIZATION_REQUIRED; if your credit balance is empty, 402 INSUFFICIENT_CREDITS. Use the returned execution.id to poll GET /v1/applications/{applicationId}/executions/{executionId} with the same access token until its status is COMPLETED, which means it succeeded and result is set, or FAILED, where terminal.status names the reason.

Authorization

connectionToken
AuthorizationBearer <token>

The connection access token from POST /v1/oauth/token.

In: header

Path Parameters

applicationId*string

The application id, which is also the OAuth client_id.

Formatuuid

Header Parameters

Idempotency-Key?string
Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/applications/497f6eca-6276-4993-bfeb-53cbbbba6f08/executions" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{  "execution": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "QUEUED",    "terminal": {      "status": "verified",      "reason": "string"    },    "prompt": "string",    "start_url": "string",    "output_schema": {},    "result": {      "final_text": "string",      "final_url": "string",      "final_title": "string",      "extracted": null,      "evidence": {        "urls": [          "string"        ],        "verifier": {          "agreed": true,          "reason": "string"        },        "side_effects": [          {}        ]      }    },    "error": {      "code": "string",      "message": "string"    },    "usage": {      "credits": 0,      "charged": true    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "completed_at": "2019-08-24T14:15:22Z"  }}