Menu QaldyDocs

AI models

The workspace’s own model provider keys, the default model, each app’s monthly budget and the usage report. 8 routes, from the API’s own OpenAPI document.

8 routes. Every path starts at https://cloud-api.qaldy.com. Sign-in, tokens, errors and limits are on the overview.

Routes

MethodPathWhat it does
GET/​v1/​workspaces/​{ws}/​aiModel connections, the default model and, for admins, each app’s AI budget
PUT/​v1/​workspaces/​{ws}/​ai/​apps/​{appId}/​budgetSet an app’s monthly AI budget, or null to use the one its manifest names (admins)
POST/​v1/​workspaces/​{ws}/​ai/​connectionsAdd a model provider: the key is sealed to the gate and never returned (admins)
PUT/​v1/​workspaces/​{ws}/​ai/​connections/​{id}Rename a connection, change its models and prices, or replace its key (admins)
DELETE/​v1/​workspaces/​{ws}/​ai/​connections/​{id}Remove a connection and its sealed key (admins)
POST/​v1/​workspaces/​{ws}/​ai/​connections/​{id}/​testTest the key: the gate asks the provider for its model list, no tokens (admins)
PUT/​v1/​workspaces/​{ws}/​ai/​default-modelThe model apps use when their manifest names none (admins)
GET/​v1/​workspaces/​{ws}/​ai/​usageModel use by day, app and model: tokens and cost at your prices (apps you can view)

Reference

GET /v1/workspaces/{ws}/ai

Model connections, the default model and, for admins, each app’s AI budget.

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: member (money and apps: admin)
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters

Response 200

FieldTypeRequiredNotes
availablebooleanyes
unavailableobject or nullyes
unavailable.reason"no_connection" · "profile"yes
unavailable.messagestringyes
unavailable.hintstringyes
canManagebooleanyes
connectionsobject[]yes
connections[].idstringyes
connections[].provider"anthropic" · "openai" · "openai-compatible"yes
connections[].labelstringyes
connections[].baseUrlstringyes
connections[].hoststringyes
connections[].modelsobject[]yes
connections[].keyState"write-only"yes
connections[].keyIdstringyes
connections[].status"connected" · "error"yes
connections[].createdAtstring (date-time)yes
connections[].updatedAtstring (date-time)yes
defaultModelstring or nullyes1 to 80 characters
monthobjectyes
month.startstring (date)yes
month.endstring (date)yes
appsobject[]yes
apps[].appIdstringyes
apps[].namestringyes
apps[].declaredobjectyes
apps[].budgetUsdnumberyesat least 0
apps[].budgetSource"manifest" · "override"yes
apps[].manifestBudgetUsdnumberyesat least 0
apps[].spentUsdnumberyesat least 0

…and 3 more fields. The full schema is in openapi.json.

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

PUT /v1/workspaces/{ws}/ai/apps/{appId}/budget

Set an app’s monthly AI budget, or null to use the one its manifest names (admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin, not a token
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters
appIdpathstringyes1 to 128 characters

Request body (application/json)

FieldTypeRequiredNotes
monthlyBudgetUsdnumber or nullyes0 to 10000

Response 200

FieldTypeRequiredNotes
appIdstringyes
namestringyes
declaredobjectyes
declared.profile"standard" · "private"yes
declared.monthlyBudgetUsdnumberyesat least 0
declared.modelsstring[]yes
budgetUsdnumberyesat least 0
budgetSource"manifest" · "override"yes
manifestBudgetUsdnumberyesat least 0
spentUsdnumberyesat least 0
callsintegeryesat least 0
missingModelsstring[]yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

POST /v1/workspaces/{ws}/ai/connections

Add a model provider: the key is sealed to the gate and never returned (admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin, not a token
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters

Request body (application/json)

FieldTypeRequiredNotes
provider"anthropic" · "openai" · "openai-compatible"yes
labelstringyes2 to 60 characters
baseUrlstringup to 300 characters
apiKeystringyesup to 576 characters
modelsobject[]yesup to 16 items
models[].idstringyes1 to 80 characters
models[].inputUsdPerMToknumberyes0 to 1000
models[].outputUsdPerMToknumberyes0 to 1000
models[].maxOutputTokensinteger1 to 200000

Response 200

FieldTypeRequiredNotes
idstringyes
provider"anthropic" · "openai" · "openai-compatible"yes
labelstringyes
baseUrlstringyes
hoststringyes
modelsobject[]yes
models[].idstringyes1 to 80 characters
models[].inputUsdPerMToknumberyes0 to 1000
models[].outputUsdPerMToknumberyes0 to 1000
models[].maxOutputTokensinteger1 to 200000
keyState"write-only"yes
keyIdstringyes
status"connected" · "error"yes
createdAtstring (date-time)yes
updatedAtstring (date-time)yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

PUT /v1/workspaces/{ws}/ai/connections/{id}

Rename a connection, change its models and prices, or replace its key (admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin, not a token
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters
idpathstringyes1 to 128 characters

Request body (application/json)

FieldTypeRequiredNotes
labelstringyes2 to 60 characters
modelsobject[]yesup to 16 items
models[].idstringyes1 to 80 characters
models[].inputUsdPerMToknumberyes0 to 1000
models[].outputUsdPerMToknumberyes0 to 1000
models[].maxOutputTokensinteger1 to 200000
apiKeystringup to 576 characters

Response 200

FieldTypeRequiredNotes
idstringyes
provider"anthropic" · "openai" · "openai-compatible"yes
labelstringyes
baseUrlstringyes
hoststringyes
modelsobject[]yes
models[].idstringyes1 to 80 characters
models[].inputUsdPerMToknumberyes0 to 1000
models[].outputUsdPerMToknumberyes0 to 1000
models[].maxOutputTokensinteger1 to 200000
keyState"write-only"yes
keyIdstringyes
status"connected" · "error"yes
createdAtstring (date-time)yes
updatedAtstring (date-time)yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

DELETE /v1/workspaces/{ws}/ai/connections/{id}

Remove a connection and its sealed key (admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin, not a token
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters
idpathstringyes1 to 128 characters

Response 200

FieldTypeRequiredNotes
oktrueyes
affectedAppsstring[]yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

POST /v1/workspaces/{ws}/ai/connections/{id}/test

Test the key: the gate asks the provider for its model list, no tokens (admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters
idpathstringyes1 to 128 characters

Response 200

FieldTypeRequiredNotes
checked"gate" · "unreachable" · "mock"yes
okboolean or nullyes
statusinteger or nullyes0 to 999
latencyMsinteger or nullyesat least 0
reason"auth_rejected" · "upstream_error" · "upstream_failed" · "dns_failed" · "private_address" · "secret_unavailable" · "invalid_config" · null or nullyes
connectionobjectyes
connection.idstringyes
connection.provider"anthropic" · "openai" · "openai-compatible"yes
connection.labelstringyes
connection.baseUrlstringyes
connection.hoststringyes
connection.modelsobject[]yes
connection.keyState"write-only"yes
connection.keyIdstringyes
connection.status"connected" · "error"yes
connection.createdAtstring (date-time)yes
connection.updatedAtstring (date-time)yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

PUT /v1/workspaces/{ws}/ai/default-model

The model apps use when their manifest names none (admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin, not a token
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters

Request body (application/json)

FieldTypeRequiredNotes
modelstringyes1 to 80 characters

Response 200

FieldTypeRequiredNotes
defaultModelstringyes1 to 80 characters

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

GET /v1/workspaces/{ws}/ai/usage

Model use by day, app and model: tokens and cost at your prices (apps you can view).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: admin; one appId: anyone who can open the app
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters
rangequery"7d" · "30d" · "90d"default "30d"
appIdquerystring1 to 128 characters

Response 200

FieldTypeRequiredNotes
range"7d" · "30d" · "90d"yes
appIdstring or nullyes
timezonestringyes
generatedAtstring (date-time)yes
fromstring (date)yes
tostring (date)yes
monthStartstring (date)yes
totalsobjectyes
totals.callsintegeryesat least 0
totals.refusedintegeryesat least 0
totals.inputTokensnumberyesat least 0
totals.outputTokensnumberyesat least 0
totals.costUsdnumberyesat least 0
dailyobject[]yes
daily[].daystring (date)yes
daily[].callsintegeryesat least 0
daily[].refusedintegeryesat least 0
daily[].inputTokensnumberyesat least 0
daily[].outputTokensnumberyesat least 0
daily[].costUsdnumberyesat least 0
byAppobject[]yes
byApp[].appIdstringyes
byApp[].namestring or nullyes
byApp[].callsintegeryesat least 0
byApp[].refusedintegeryesat least 0
byApp[].inputTokensnumberyesat least 0
byApp[].outputTokensnumberyesat least 0
byApp[].costUsdnumberyesat least 0
byApp[].budgetUsdnumber or nullyesat least 0
byApp[].budgetSource"manifest" · "override" · null or nullyes

…and 2 more fields. The full schema is in openapi.json.

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

Type to search. Up and down to choose, Enter to open, Esc to close.