API Overview
API Overview
Section titled “API Overview”Base URL
Section titled “Base URL”Your base URL is provided by your administrator.
Endpoints
Section titled “Endpoints”| Method | Endpoint | Auth Required | Description |
|---|---|---|---|
GET | /health | No | Check API and service availability |
POST | /api/{productSlug} | Yes | Submit inputs and receive illustration results |
Request Format
Section titled “Request Format”All POST requests must include:
Content-Type: application/jsonheader- Authentication header (
Authorization: BearerorX-API-Key) - JSON body with your input data
Request Body
Section titled “Request Body”Send your inputs inside an inputs object:
{ "inputs": { "field1": "value1", "field2": 100000 }}The specific fields required depend on your product configuration. Your administrator will provide the list of expected input fields.
Response Format
Section titled “Response Format”JSON Response (?format=json)
Section titled “JSON Response (?format=json)”{ "status": 200, "response_data": { "outputs": { "OutputField1": 42500.00, "OutputField2": "some value" } }}PDF Response (?format=pdf)
Section titled “PDF Response (?format=pdf)”Returns a binary PDF file with headers:
Content-Type: application/pdfContent-Disposition: attachment; filename="illustration_2025-01-15T10-30-00.pdf"Both (?format=both)
Section titled “Both (?format=both)”Returns JSON outputs with a base64-encoded PDF embedded:
{ "status": 200, "response_data": { "outputs": { ... } }, "pdf": { "fileName": "illustration_2025-01-15T10-30-00.pdf", "data": "JVBERi0xLjQK...", "pageCount": 12 }}Response Format Control
Section titled “Response Format Control”| Method | How to Use |
|---|---|
| Query parameter | ?format=json, ?format=pdf, or ?format=both |
| Default | Your product has a default format configured by your administrator |
The ?format query parameter always takes precedence over the product default.
HTTP Status Codes
Section titled “HTTP Status Codes”| Code | Description |
|---|---|
200 | Success |
400 | Bad request — missing or invalid input data |
401 | Unauthorized — invalid, missing, or expired API key |
403 | Forbidden — API key not authorized for this product |
404 | Product not found or inactive |
429 | Rate limit exceeded |
500 | Internal server error |
502 | Upstream service authentication failed |
503 | Upstream service unavailable |
See Error Reference for details on each code.
Rate Limiting
Section titled “Rate Limiting”Rate limits are set per API key by your administrator. Every response includes usage headers:
X-RateLimit-Limit: 60X-RateLimit-Remaining: 58X-RateLimit-Daily-Limit: 10000X-RateLimit-Daily-Remaining: 9998When a limit is exceeded you receive a 429 response with a Retry-After header indicating when you can retry.
See Rate Limits for full details.
Health Check
Section titled “Health Check”GET /healthNo authentication required. Returns the current status of the API and its dependent services.
{ "status": "ok", "services": { "database": "ok", "redis": "ok" }}If any service is degraded, the response will indicate "error" for that service.