Skip to main content
Returns your own API usage rows — the same data the Developer Dashboard’s Logs tab displays. Useful for monthly cost reconciliation, debugging failed runs, or feeding usage into your own dashboards.

Endpoint

GET /api/usage

Authentication

Any authenticated request (no specific capability required). Returns only your own rows.
Privacy boundary. This endpoint filters by source IN ('api-slim', 'api-workflow') — canvas runs are excluded. Provider-level model IDs that appear in canvas rows (fal:..., raw upstream URLs) never reach this endpoint, even for your own account.

Query parameters

status
string
Filter by lifecycle status: processing, completed, or failed.
modelId
string
Filter by model internalName (e.g. gpt-image-2, seedance-2-0-full-access).
workflowSlug
string
Filter by workflow slug.
limit
number
Max rows. Default 50, max 500.
offset
number
Pagination offset. Default 0.

Response

{
  "rows": [
    {
      "id": 188,
      "userId": "u_abc",
      "workflowSlug": "my-pipeline",
      "modelIds": ["gpt-image-2"],
      "status": "completed",
      "source": "api-slim",
      "cost": 0.12,
      "userCost": 0.255,
      "creditsCost": 255,
      "durationMs": 47210,
      "errorCode": null,
      "requestId": "kie_xyz789",
      "createdAt": "2026-05-08T19:29:55.000Z"
    }
  ],
  "page": 0,
  "pageSize": 50,
  "total": 312
}
rows[].id
number
Row id (increasing per row).
rows[].workflowSlug
string
Workflow slug if this was a workflow run; null for direct model runs.
rows[].modelIds
string[]
Registry internalNames involved in the run.
rows[].status
string
processing / completed / failed / cancelled.
rows[].source
string
api-slim (direct model run) or api-workflow (workflow run). Canvas runs filtered out.
rows[].cost
number
Provider wholesale cost in USD.
rows[].userCost
number
What you paid (USD), after tier markup.
rows[].creditsCost
number
Credits deducted from your balance.
rows[].durationMs
number
Total execution time in milliseconds.
rows[].errorCode
string
Error code on status: 'failed' rows (e.g. EXECUTION_FAILED, PROVIDER_RESPONSE_INCOMPLETE).
rows[].requestId
string
Provider-side request id (Kie.ai’s taskId, Suno’s id, etc.) for cross-referencing.

Examples

# Last 50 calls
curl https://knouds.ai/api/usage \
  -H "x-api-key: $KNOUDS_KEY"

# Only failed runs
curl "https://knouds.ai/api/usage?status=failed&limit=100" \
  -H "x-api-key: $KNOUDS_KEY"

# Last 10 calls to a specific workflow
curl "https://knouds.ai/api/usage?workflowSlug=my-pipeline&limit=10" \
  -H "x-api-key: $KNOUDS_KEY"

# Last 50 calls to a specific model
curl "https://knouds.ai/api/usage?modelId=seedance-2-0-full-access&limit=50" \
  -H "x-api-key: $KNOUDS_KEY"

Distinct model IDs

GET /api/usage/models
Returns the distinct list of model internalNames that appear in your usage history — useful for building a filter dropdown.
curl https://knouds.ai/api/usage/models \
  -H "x-api-key: $KNOUDS_KEY"
# → ["gpt-image-2", "kling-v3-i2v", "seedance-2-fast", "suno-v5"]