Knowledge

Preview a base's costs

POST
/api/v1/knowledge/bases/{kb_id}/cost-preview

What indexing the base costs with its settings, or with overrides: pages, tokens and estimated USD by stage, and the budget left this month. Starts nothing.

More in Knowledge API.

apiKey
headerAuthorizationBearer <token>

An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.

kb_id*string
application/json
  1. body

Settings to price instead of the stored ones (a draft the settings screen has not saved).

overrides?|null

Response Body

Successful Response

application/json
  1. response
docs*integer
pages*integer
stages?array<>
total_est_usd*number
budget_remaining_usd?number|null
curl -X POST "https://api.synapseorch.com/api/v1/knowledge/bases/kb_01a10d3f5a7c9e1b3d5f7a9c1e3b5d7f/cost-preview" \  -H "Authorization: Bearer sk-syn-..." \  -H "Content-Type: application/json" \  -d '{}'
{  "docs": 0,  "pages": 0,  "stages": [    {      "stage": "string",      "model": "string",      "units": 0,      "unit": "string",      "est_usd": 0,      "cost_source": "string"    }  ],  "total_est_usd": 0,  "budget_remaining_usd": 0}