ExDocApi/ Docs

GET /api/v1/usage

Check your credit balance and recent usage history.

Requires authentication.


Endpoint

GET /api/v1/usage
Authorization: Bearer <api_key>
curl "https://exdocapi.cheapehai.shop/api/v1/usage" \
  -H "Authorization: Bearer $EXDOC_API_KEY"

Response — 200 OK

{
  "credit_balance": 47,
  "recent_usage": [
    {
      "delta_pages": -2,
      "reason": "extraction",
      "job_id": "a1b2c3d4-...",
      "created_at": "2024-11-15T10:23:00Z"
    },
    {
      "delta_pages": -1,
      "reason": "extraction",
      "job_id": "b2c3d4e5-...",
      "created_at": "2024-11-14T08:11:00Z"
    },
    {
      "delta_pages": 500,
      "reason": "purchase",
      "job_id": null,
      "created_at": "2024-11-01T09:00:00Z"
    }
  ]
}

| Field | Description | |-------|-------------| | credit_balance | Current available credits (pages) | | recent_usage | Last 20 credit events, newest first | | delta_pages | Negative = credits used, positive = credits added | | reason | extraction / purchase / adjustment / subscription_reset | | job_id | Linked job UUID for extraction events, null for purchases |

← PreviousGET /jobs/:id/resultNext →Schemas