Usage and quota
DocSlice counts what you use in pages, per calendar month.
How pages are counted
- Every page of a converted document counts, including pages read with OCR.
- The quota is per calendar month in UTC. It starts again from zero on the first day of each month.
- A request that fails does not use pages: pages are only counted when the conversion succeeds.
- A free account in the beta has 500 welcome pages, which do not expire, and 50 pages per month that start again every month and do not carry over. The pages of the month are used first, then the welcome pages. Plans and prices will be announced before launch.
Check your quota
GET /v1/usage returns your plan, monthly quota, pages used, the welcome pages you still have, the pages you can still use, and your rate limit:
curl -s https://api.docslice.app/v1/usage \
-H "Authorization: Bearer $DOCSLICE_API_KEY"
import json
import os
import requests
response = requests.get(
"https://api.docslice.app/v1/usage",
headers={"Authorization": f"Bearer {os.environ['DOCSLICE_API_KEY']}"},
timeout=30,
)
print(json.dumps(response.json(), indent=2))
fetch("https://api.docslice.app/v1/usage", {
headers: { Authorization: `Bearer ${process.env.DOCSLICE_API_KEY}` },
})
.then((response) => response.json())
.then((data) => console.log(JSON.stringify(data, null, 2)));
<?php
$curl = curl_init('https://api.docslice.app/v1/usage');
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DOCSLICE_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
echo curl_exec($curl);
curl_close($curl);
{
"tier": "free",
"pages_quota": 50,
"pages_used": 37,
"welcome_pages": 500,
"pages_remaining": 513,
"rate_limit_per_minute": 20
}
pages_quota and pages_used count the month. welcome_pages is what is left of your welcome pages. pages_remaining is what you can still use: the rest of the month (13 here) plus the welcome pages (500).
Read the history
GET /v1/usage/history lists your latest conversions, newest first. Use limit (1 to 500, default 50). Each row has id, endpoint, file_name, pages_billed, duration_ms, status_code and created_at.
curl -s "https://api.docslice.app/v1/usage/history?limit=10" \
-H "Authorization: Bearer $DOCSLICE_API_KEY"
import json
import os
import requests
response = requests.get(
"https://api.docslice.app/v1/usage/history",
headers={"Authorization": f"Bearer {os.environ['DOCSLICE_API_KEY']}"},
params={"limit": 10},
timeout=30,
)
print(json.dumps(response.json(), indent=2))
fetch("https://api.docslice.app/v1/usage/history?limit=10", {
headers: { Authorization: `Bearer ${process.env.DOCSLICE_API_KEY}` },
})
.then((response) => response.json())
.then((data) => console.log(JSON.stringify(data, null, 2)));
<?php
$curl = curl_init('https://api.docslice.app/v1/usage/history?limit=10');
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DOCSLICE_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
echo curl_exec($curl);
curl_close($curl);
When the quota is used up
A request that arrives when you have no pages left, neither in the month nor in the welcome pages, is refused with 402 and a message such as Page quota exceeded (50/50 monthly pages used, 0 welcome pages left). A single document that needs more pages than you have left is refused too. In a batch, the files that no longer fit are reported as errors. The monthly pages renew on the first of the next month; welcome pages do not renew.
In the dashboard
The same numbers are in the dashboard: a bar with the pages used, the renewal date and your recent usage.