API ReferenceEndpointsWorkspaces
Get the workspace's AI gateway settings
The AI gateway's settings for the workspace, the caller's role, the base URL for OpenAI SDKs, and what the gateway charged this month.
Authorization
cloady AuthorizationBearer <token>
Personal API token (cldy_…)
In: header
Path Parameters
workspaceSlug*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/ai"{ "ai": { "settings": { "models": [ "string" ], "defaultModel": "string", "budgetCents": 0, "onLimit": "notify", "alerts": [ 50 ], "keyDefaults": { "budgetCents": 0, "rpm": 1, "models": "all" }, "redactPii": true, "logPrompts": true, "retentionDays": 7, "maxTokens": 256, "aliases": [ { "id": "string", "chain": [ "string" ], "strategy": "fallback" } ], "retries": 0, "timeoutSec": 5, "fallbackOn": [ "429" ] }, "role": "owner", "endpoint": "string", "month": { "spentMicros": 0, "freeMicros": 0, "requests": 0 } }}Read a trace GET
Returns the spans the workspace's apps sent in a trace, in tree order, with each span's service, timing, status, first exception and attributes. Spans from outside the workspace are left out. Answers 404 when no span of the trace belongs to the workspace, it was sampled out, or it is older than 7 days.
Change the workspace's AI gateway settings PATCH
Change the gateway's models, budget, guardrails and routing (admin role). Fields left out keep their values.