SnozeDevelopers
API referenceAutomations

Read an automation's AI credit use

Returns the AI credits the automation's AI and code steps spent in the workspace's current usage period (settled charges plus holds still settling) and its monthly AI budget, or null when it has none. One credit is $0.001 of model or sandbox cost. Requires the `automations:read` permission plus view access to the automation.

GET
/v1/workspaces/{workspaceId}/automations/{automationId}/ai-usage

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
automationId*string

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.snoze.dev/v1/workspaces/string/automations/string/ai-usage'
Example Response
{  "data": {    "automationId": "string",    "periodStart": "string",    "periodEnd": "string",    "usedMicrousd": 0,    "usedCredits": 0,    "monthlyBudgetMicrousd": 0,    "monthlyBudgetCredits": 0  }}