Syndai Docs

Get runs' costs

Use a key with only read scopes. Your customer_id is in the reply to Get the calling API key.

GET
/api/v1/external/coding/runs/costs

Read what each listed run (id, repeated) charged: credits charged, work value, API value and share. A run that is not yours is simply absent. Requires the coding:runs:read scope.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Query Parameters

id*array<>
Itemsitems <= 200
customer_id?|null

Response Body

Request fulfilled, document follows

application/json
  1. response
costs*
Example Request
curl -X GET 'https://api.syndai.ai/api/v1/external/coding/runs/costs?id=497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "costs": {    "property1": {      "api_value_usd": 0,      "charged_usd": 0,      "subscription_share": {        "account_label": "string",        "final": true,        "overage": true,        "pct": 0,        "provider": "string",        "window": "string"      },      "work_usd": 0    },    "property2": {      "api_value_usd": 0,      "charged_usd": 0,      "subscription_share": {        "account_label": "string",        "final": true,        "overage": true,        "pct": 0,        "provider": "string",        "window": "string"      },      "work_usd": 0    }  }}
Was this page helpful?