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
Credits are consumed based on the tokens used by a completed job.
tokens_used is reported on every successful JobOut response, so you can track actual cost per job.
A minimum credit balance is required to submit a job (checked at request time):
design_mode |
Minimum balance to start |
|---|---|
standard |
5 credits |
pro |
7 credits |
assembly |
7 credits |
If your balance is below the minimum when you submit, the request is rejected immediately with 402 insufficient_credits — no job is queued. Higher-complexity modes (pro, assembly) use more tokens on average and therefore consume more credits per job, but the exact amount depends on the specific design.
Note:
image-to-cadsupports only"standard"and"assembly"modes —"pro"is not available for the image endpoint. Sending"pro"to/v1/image-to-cadreturns422 invalid_input.
For current credit-to-dollar pricing (credit pack options and per-credit rates), see the dashboard billing page.
Running Out of Credits
If your account has insufficient credits when you submit a job, the request is rejected immediately:
HTTP 402
{
"error_code": "insufficient_credits"
}
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.