Wapgee Logowapgee

API

Call wapgee tools over HTTP with a personal API token. The tools on the site keep running in your browser. The API is a separate, server-side path.

Getting a token

  1. Log in.
  2. Open Tools, then Tokens in the dashboard.
  3. Name the token and create it. The full token is shown once. Copy it then. It cannot be retrieved later.

Each account can hold 5 active tokens. Revoking a token takes effect immediately.

Authentication

Send the token on every request in the Authorization header:

Authorization: Bearer wpg_your_token

A missing, unknown or revoked token, or a locked account, returns 401.

Credits

Credits are the unit of API usage. Each request costs a fixed number of credits, listed under Tools. Credits are shared across all tokens on an account. 5 credits = $0.01.

Every account receives 50 credits per UTC day. The daily amount resets at 00:00 UTC and does not carry over.

Only successful requests are charged. Rejected requests (validation errors, rate limit, insufficient credits) cost 0. If a request fails after the charge, the credits are refunded.

Each token is limited to 30 requests per minute. Usage history is retained for 90 days.

Response headers

HeaderMeaning
X-Credits-CostCredits charged for this request. 0 if rejected or refunded.
X-Credits-RemainingCredits left after this request.
X-RateLimit-LimitRequests allowed per minute for this token.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetWhen the window resets, as unix time in seconds.
Retry-AfterOn 429 only. Seconds until you can retry: until the rate-limit window resets (at most 60) for rate_limited, or until the next 00:00 UTC for insufficient_credits when the daily amount can cover the request.

Credit headers are sent on every authenticated tool response, including errors. A rate_limited response sends X-Credits-Cost: 0 only. A 401 or an unexpected 500 may send neither. GET /api/v1/usage reports a cost of 0.

Errors

Errors return { success: false, error, code } with the matching HTTP status. code is a stable identifier. Match on it, not on the message.

HTTP/1.1 429 Too Many Requests
X-Credits-Cost: 0
X-Credits-Remaining: 2
Retry-After: 43200

{
  "success": false,
  "error": "Insufficient credits.",
  "code": "insufficient_credits",
  "credits": {
    "required": 5,
    "remaining": 2,
    "dailyFree": 50,
    "resetsAt": "2026-10-05T00:00:00.000Z"
  }
}
StatusCodeWhen
400invalid_requestThe request failed validation, or the tool rejected the input.
401missing_tokenNo token was sent.
401invalid_tokenThe token is not recognised.
401token_revokedThe token has been revoked.
401account_lockedThe account is locked.
413payload_too_largeThe input is larger than the endpoint allows.
429insufficient_creditsThe request costs more credits than the account has.
429rate_limitedThe token exceeded its per-minute limit.
500internal_errorAn unexpected error occurred.
502upstream_errorA dependency failed, for example PDF rendering or fetching a URL.
503service_unavailableThe service is busy. Retry shortly.
504timeoutThe request took too long.

Check your credits

GET /api/v1/usage returns your credit balance and the cost of each tool. It is free of charge and also shown on the Credits page.

curl https://wapgee.com/api/v1/usage \
  -H "Authorization: Bearer wpg_your_token"
{
  "success": true,
  "credits": {
    "free": 42,
    "paid": 0,
    "total": 42,
    "dailyFree": 50,
    "resetsAt": "2026-10-05T00:00:00.000Z"
  },
  "tools": [
    { "tool": "csv-json-converter", "cost": 1 },
    { "tool": "csv-to-parquet", "cost": 4 },
    { "tool": "html-table-to-markdown", "cost": 1 },
    { "tool": "html-to-pdf", "cost": 5 },
    { "tool": "json-yaml-typescript", "cost": 1 },
    { "tool": "markdown-to-pdf", "cost": 5 },
    { "tool": "parquet-to-csv", "cost": 4 }
  ]
}

Each tool's request and response are documented on its tool page.

Tools

Each endpoint is documented in the API section of its tool page.

ToolEndpointCredits per request
Markdown to PDFPOST /api/v1/tools/markdown-to-pdf5
HTML to PDFPOST /api/v1/tools/html-to-pdf5
CSV ⇌ JSON ConverterPOST /api/v1/tools/csv-json-converter1
JSON / YAML / TypeScriptPOST /api/v1/tools/json-yaml-typescript1
HTML Table to Markdown / CSVPOST /api/v1/tools/html-table-to-markdown1
Parquet to CSVPOST /api/v1/tools/parquet-to-csv4
CSV to ParquetPOST /api/v1/tools/csv-to-parquet4

Changelog

  • October 2026. Credits replace the per-tool daily limits. GET /api/v1/usage now returns credits and tools[].cost. Use credits.total in place of tools[].remaining.