Rate Limits & Credits
Rate Limits
Rate limits apply per API key using a sliding-window algorithm:
| Window | Limit |
|---|---|
| Per minute | 20 requests |
| Per hour | 100 requests |
When a limit is exceeded, the API returns:
HTTP 429
{
"error_code": "quota_exceeded",
"message": "per-minute limit (20/min) exceeded"
}
Retry strategy: Wait at least 60 seconds before retrying after a 429. Do not retry immediately — the window is sliding, so rapid retries continue to hit the limit.
import time, httpx
def post_with_rate_limit_retry(url, **kwargs):
for attempt in range(4):
resp = httpx.post(url, **kwargs)
if resp.status_code != 429:
resp.raise_for_status()
return resp
wait = 60 * (2 ** attempt) # 60s, 120s, 240s, 480s
print(f"Rate limited, waiting {wait}s...")
time.sleep(wait)
raise RuntimeError("Exceeded retry attempts")
Credits
Makistry uses a credit system to meter API usage. Credits are checked and reserved when you submit a job, then consumed when the job succeeds.
Credit Costs
Credit cost varies by design_mode:
design_mode |
Relative cost |
|---|---|
standard |
1× |
pro |
2–3× |
assembly |
3–5× |
For current credit-to-dollar pricing (credit pack options and per-credit rates), see the dashboard billing page. Exact credit consumption for each completed job is reported in tokens_used on the JobOut response.
Running Out of Credits
If your account has insufficient credits when you submit a job, the request is rejected immediately:
HTTP 402
{
"error_code": "payment_required"
}
The job is not queued. Top up credits from the dashboard before resubmitting.
Free Credits
New API keys receive a free credit allocation on creation, shown as free_credits_remaining in the key creation response.
Monitoring Usage
Every completed JobOut includes:
| Field | Description |
|---|---|
tokens_used |
Total billable tokens consumed by the job |
latency_ms |
Wall-clock time the pipeline took |
Use these to estimate costs and optimize your design_mode selection. standard mode is significantly cheaper for simple parts; only use pro or assembly when the geometry requires it.