C
ChowAPI

Account

Check your usage, list API keys, and manage your account.

GET/v1/account/usage

Get usage

Returns current month API usage for the authenticated key.

curl "https://api.chowapi.dev/v1/account/usage" \
  -H "Authorization: Bearer chow_live_YOUR_KEY"
200 OK
{
  "key_id": "a1b2c3d4-...",
  "tier": "free",
  "month": "2026-03-01",
  "call_count": 1250,
  "monthly_limit": 10000,
  "has_payment_method": false
}
GET/v1/account/keys

List API keys

Returns all API keys for the authenticated user.

200 OK
{
  "keys": [
    {
      "id": "a1b2c3d4-...",
      "key_prefix": "chow_live_abc...",
      "name": "Production",
      "tier": "payg",
      "monthly_limit": null,
      "is_active": true,
      "has_payment_method": true,
      "created_at": "2026-01-15T10:30:00Z",
      "last_used_at": "2026-03-25T14:45:00Z"
    }
  ]
}
POST/v1/account/keys

Create API key

Requires Supabase JWT authentication (not API key auth).

curl -X POST "https://api.chowapi.dev/v1/account/keys" \
  -H "Authorization: Bearer YOUR_SUPABASE_JWT" \
  -H "Content-Type: application/json" \
  -d '{"name": "My App"}'
201 Created
{
  "api_key": "chow_live_abc123...",
  "key_id": "a1b2c3d4-...",
  "name": "My App",
  "tier": "free",
  "monthly_limit": 10000,
  "message": "API key created. Save it. It won't be shown again."
}
DELETE/v1/account/keys/{id}

Revoke API key

Permanently deactivates an API key. Requires Supabase JWT.

PATCH/v1/account/keys/{id}

Rename API key

Update the display name of an API key. Requires Supabase JWT.