API Reference

AI Credits

The monthly AI credit allowance, what used it, and credit packs.

12 endpoints· Auth: JWT or API Key
get/api/v1/console/ai-credits JWT API Key

Get ai-credits

The balance, reset date, spend by feature and model, past own-key use, the estimates and the top-ups. Organisation-wide for an organisation admin (`branch_id` narrows it); the caller's branch otherwise.

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Query parameters

BranchId
string (uuid)
One branch of the organisation; absent is the whole organisation (organisation admins only).

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/days JWT API Key

Credits per Baghdad day, every day of the range, split by feature

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Query parameters

From
string (date)
—
To
string (date)
—
Days
integer (int32)
The last N Baghdad days ending today (1–366), Sendy's form; ignored when `from` is given.
BranchId
string (uuid)
One branch of the organisation; absent is the whole organisation (organisation admins only).

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/days" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/features/{feature} JWT API Key

The model and key chosen for the owner assistant or invoice photos

Capability
view_profit
API key scope
cap:view_profit (the key's owner must also hold the capability)

Path parameters

featurerequired
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/features/{feature}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
put/api/v1/console/ai-credits/features/{feature} JWT

Update feature

Capability
view_profit
Signed-in user only
API keys and OAuth tokens are refused (403). Do this in the dashboard.

Path parameters

featurerequired
string
—

Request body

application/json
{
  "keyMode": "string",
  "modelCode": "string",
  "apiKey": "string"
}
keyMode
string
Optional, and only ever `platform`. `byo` is refused 422 `AI_OWN_KEY_REMOVED`: own keys were removed (2026-11-26).
modelCode
string
A catalogue model usable for the feature; blank follows the install's default.
apiKey
string
Never stored. Any non-blank value is refused 422 `AI_OWN_KEY_REMOVED`.

Responses

200Success
cURL
curl -X PUT "https://staging-api.panoptesos.com/api/v1/console/ai-credits/features/{feature}" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "keyMode": "string",
  "modelCode": "string",
  "apiKey": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

This action refuses API keys — it needs a signed-in user. Switch to a JWT under Authorize, or do it in the dashboard.
Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/grants JWT API Key

The organisation's top-ups, live and past, newest first

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/grants" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/ledger JWT API Key

Every model run, newest first, paged; filter by feature, key mode and branch

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Query parameters

Feature
string
`agent` | `agent_test` | `assistant` | `invoice_vision`.
KeyMode
string
`platform` | `byo`.
BranchId
string (uuid)
—
Page
integer (int32)
—
PerPage
integer (int32)
—
Search
string
Free-text filter. Its meaning is per-resource and documented on the endpoint.
Skip
integer (int32)
Rows to skip, derived — never sent by the caller on this surface.
Sort
string
A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order.
Dir
string
`asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/ledger" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/months JWT API Key

Credits per Baghdad month (`months`, default 12), split by feature

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Query parameters

Months
integer (int32)
The last N Baghdad months ending this one, 1–24; default 12.
BranchId
string (uuid)
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/months" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/packs JWT API Key

The credit packs on sale (manual payment, D2)

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/packs" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/purchases JWT API Key

The organisation's pack requests and purchases, newest first

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/purchases" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/ai-credits/purchases JWT

Ask the vendor team for a pack; they take the payment, then add the credits

Capability
view_profit
Signed-in user only
API keys and OAuth tokens are refused (403). Do this in the dashboard.

Request body

application/json
{
  "packId": "00000000-0000-0000-0000-000000000000",
  "note": "string"
}
packId
string (uuid)
—
note
string
A note to the vendor team, up to 500 characters (how you will pay, a contact).

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/ai-credits/purchases" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "packId": "00000000-0000-0000-0000-000000000000",
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

This action refuses API keys — it needs a signed-in user. Switch to a JWT under Authorize, or do it in the dashboard.
Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/purchases/{purchaseId} JWT API Key

Get purchaseId

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Path parameters

purchaseIdrequired
string (uuid)
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/purchases/{purchaseId}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/ai-credits/sources JWT API Key

Get sources

Where the credits went: each inbox conversation, each assistant thread, and the buckets, most credits first, paged. `feature` = `agent` | `assistant`; range defaults to this month.

Capability (any)
manage_messagingorview_profit
API key scope
cap:manage_messagingorcap:view_profit (the key's owner must also hold the capability)

Query parameters

Feature
string
`agent` (replies and test chats) | `assistant`; empty is everything.
From
string (date)
—
To
string (date)
—
BranchId
string (uuid)
—
Page
integer (int32)
—
PerPage
integer (int32)
—
Search
string
Free-text filter. Its meaning is per-resource and documented on the endpoint.
Skip
integer (int32)
Rows to skip, derived — never sent by the caller on this surface.
Sort
string
A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order.
Dir
string
`asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/ai-credits/sources" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu