Account
Use the Account APIs to manage your PDF-Loom account programmatically. Check your credit balance, list your API tokens, and review request history.
Get credit balance
Retrieve your current credit balance and credit bucket details with expiration dates. Credits expire after 1 month and are consumed from the earliest-expiring bucket first (FIFO).
This endpoint does not consume credits and can be called frequently to monitor your balance.
Response attributes
- Name
success- Type
- boolean
- Description
Whether the request succeeded.
- Name
credits- Type
- object
- Description
Credit balance information.
- Name
available- Type
- integer
- Description
Total available credits across all buckets.
- Name
buckets- Type
- array
- Description
Array of credit buckets with amounts and expiration dates.
- Name
amount- Type
- integer
- Description
Number of credits in this bucket.
- Name
expires_at- Type
- string
- Description
ISO 8601 timestamp when this bucket expires.
Request
curl https://api.pdfloom.com/v1/account/credits \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response
{
"success": true,
"credits": {
"available": 125,
"buckets": [
{
"amount": 50,
"expires_at": "2026-02-15T00:00:00.000000Z"
},
{
"amount": 75,
"expires_at": "2026-03-01T00:00:00.000000Z"
}
]
}
}
Credits are consumed from the earliest-expiring bucket first. Monitor your buckets to avoid losing unused credits when they expire.
List API tokens
Retrieve a list of all API tokens associated with your account. Token values are never returned—only metadata like name, prefix, scopes, and usage statistics.
This endpoint does not consume credits.
Response attributes
- Name
success- Type
- boolean
- Description
Whether the request succeeded.
- Name
tokens- Type
- array
- Description
Array of API token objects.
- Name
id- Type
- integer
- Description
Token identifier.
- Name
name- Type
- string
- Description
Human-readable token name.
- Name
prefix- Type
- string
- Description
First 8 characters of the token for identification (e.g.,
pl_abc12).
- Name
scopes- Type
- array
- Description
Array of scope strings this token has access to (e.g.,
["convert:pdf", "read:credits"]).
- Name
created_at- Type
- string
- Description
ISO 8601 timestamp when the token was created.
- Name
expires_at- Type
- string
- Description
ISO 8601 timestamp when the token expires.
- Name
last_used_at- Type
- string|null
- Description
ISO 8601 timestamp of the last API request using this token, or
nullif never used.
Request
curl https://api.pdfloom.com/v1/tokens \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response
{
"success": true,
"tokens": [
{
"id": 42,
"name": "Production API",
"prefix": "pl_abc12",
"scopes": ["convert:pdf", "convert:screenshot", "read:credits"],
"created_at": "2026-01-15T10:30:00.000000Z",
"expires_at": "2027-01-15T10:30:00.000000Z",
"last_used_at": "2026-02-02T08:15:22.000000Z"
},
{
"id": 38,
"name": "Monitoring Script",
"prefix": "pl_xyz98",
"scopes": ["read:credits", "read:requests"],
"created_at": "2026-01-10T14:20:00.000000Z",
"expires_at": "2027-01-10T14:20:00.000000Z",
"last_used_at": "2026-02-02T09:00:05.000000Z"
}
]
}
Token values are only shown once when created. This endpoint returns metadata only, not the full token string.
Get request history
Retrieve paginated request history for your account. See which endpoints were called, how many credits were consumed, and execution times.
This endpoint does not consume credits.
Query parameters
- Name
page- Type
- integerDefault: 1
- Description
Page number to retrieve (starting from 1).
- Name
limit- Type
- integerDefault: 50
- Description
Number of requests per page (maximum 100).
Response attributes
- Name
success- Type
- boolean
- Description
Whether the request succeeded.
- Name
requests- Type
- array
- Description
Array of request log objects.
- Name
id- Type
- string
- Description
Unique request identifier.
- Name
endpoint- Type
- string
- Description
API endpoint path that was called.
- Name
method- Type
- string
- Description
HTTP method (GET, POST, etc.).
- Name
status- Type
- integer
- Description
HTTP response status code.
- Name
credits_consumed- Type
- integer
- Description
Number of credits charged for this request.
- Name
filesize- Type
- integer|null
- Description
Size of the generated file in bytes, or
nullif the request failed.
- Name
filename- Type
- string|null
- Description
Name of the generated file, or
nullif the request failed.
- Name
execution_time- Type
- integer|null
- Description
Request execution time in milliseconds.
- Name
created_at- Type
- string
- Description
ISO 8601 timestamp when the request was made.
- Name
pagination- Type
- object
- Description
Pagination metadata.
- Name
page- Type
- integer
- Description
Current page number.
- Name
per_page- Type
- integer
- Description
Number of items per page.
- Name
total- Type
- integer
- Description
Total number of requests.
- Name
total_pages- Type
- integer
- Description
Total number of pages.
Request
curl https://api.pdfloom.com/v1/requests?page=1&limit=10 \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response
{
"success": true,
"requests": [
{
"id": "req_1738483200_abc123",
"endpoint": "/v1/convert/url",
"method": "POST",
"status": 200,
"credits_consumed": 2,
"filesize": 8342156,
"filename": "generated-1738483200.pdf",
"execution_time": 2450,
"created_at": "2026-02-02T10:30:00.000000Z"
},
{
"id": "req_1738482900_def456",
"endpoint": "/v1/screenshot/html",
"method": "POST",
"status": 200,
"credits_consumed": 1,
"filesize": 125468,
"filename": "screenshot-1738482900.png",
"execution_time": 1230,
"created_at": "2026-02-02T10:25:00.000000Z"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 247,
"total_pages": 25
}
}
Request history is retained for 90 days. Use the page and limit parameters to paginate through large result sets efficiently.
Error responses
All Account API endpoints use standard error responses documented on the Errors page. Common errors include:
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"error_code": "INSUFFICIENT_SCOPE",
"message": "This token does not have the required scope: read:credits",
"required_scope": "read:credits",
"token_scopes": ["convert:pdf"]
}
Required Scopes: The /v1/account/credits endpoint requires the read:credits scope, /v1/tokens requires read:tokens, and /v1/requests requires read:requests. See Authentication for more details.