Base URL
All API requests are made to the following base URL:Authentication
Authenticate every request by including your API key in theX-Avala-Api-Key header:
Request Format
The API accepts JSON-encoded request bodies. Set theContent-Type header for requests with a body:
| Header | Value |
|---|---|
X-Avala-Api-Key | Your API key |
Content-Type | application/json |
Response Format
All responses return JSON. Successful responses use standard HTTP status codes (200, 201, 204).
Single resource:
Pagination
List endpoints return paginated results using cursor-based pagination. The response includes:| Field | Type | Description |
|---|---|---|
next | string | null | URL for the next page of results, or null if this is the last page |
previous | string | null | URL for the previous page of results, or null if this is the first page |
results | array | Array of resource objects |
next URL until it returns null.
Pagination Best Practices
- Use
limitto control page size. Default is 100. Use smaller pages (10-25) for interactive UIs, larger pages (100) for batch processing. - Follow
nextURLs directly. Don’t construct pagination URLs manually. ThenextURL includes the correct cursor and any filters you applied. - Handle empty pages. A page with an empty
resultsarray andnext: nullmeans you’ve reached the end. - Don’t assume page sizes. The last page may contain fewer items than
limit. - Use the Python SDK for automatic pagination:
client.datasets.list()returns aCursorPagewithhas_moreandnext_cursorattributes.
Error Codes
When a request fails, the API returns an appropriate HTTP status code with a JSON error body:| Status Code | Description |
|---|---|
400 | Bad Request — The request body is invalid or missing required fields. |
401 | Unauthorized — API key is missing, invalid, or expired. |
403 | Forbidden — The API key does not have permission for this action. |
404 | Not Found — The requested resource does not exist. |
429 | Too Many Requests — You have exceeded the rate limit. |
500 | Internal Server Error — Something went wrong on our end. |
Rate Limits
The API enforces the following rate limits:| Limit | Value |
|---|---|
| Standard requests | 100 requests per minute |
| Burst | 20 requests per second |
| Inference | 10 requests per minute |
| Concurrent uploads | 10 simultaneous uploads |
| Concurrent exports | 5 simultaneous exports |
429 status code. Use the rate limit headers to manage your request volume:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed in the current window |
X-RateLimit-Remaining | Number of requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp (seconds) when the current window resets |
Interactive API Docs
Explore and test every endpoint directly in your browser with the interactive API documentation:Interactive API Reference
Try endpoints, inspect request and response schemas, and generate code samples.