Endpoint | Method | Description |
---|---|---|
api.sunra.ai/v1/queue/{model-id} | POST | Adds a request to the queue |
api.sunra.ai/v1/queue/requests/{request_id}/status | GET | Retrieves the status of a request |
api.sunra.ai/v1/queue/requests/{request_id}/status/stream | GET | Streams the status until completion |
api.sunra.ai/v1/queue/requests/{request_id} | GET | Fetches the response of a request |
api.sunra.ai/v1/queue/requests/{request_id}/cancel | PUT | Cancels a request |
request_id
:
request_id
and provides URLs for checking status, canceling, or retrieving the response, streamlining your workflow without additional endpoint development.
queue_position
: Shows your place in the queue.response_url
: URL for retrieving the response once processing completes.logs
: Detailed logs (if enabled) showing processing steps.response_url
: Where the final response will be available.logs
: Logs detailing the entire process.response_url
: Direct link to your completed response.message
: Description of the event.level
: Severity (e.g., INFO, ERROR).source
: Origin of the log.timestamp
: Time the log was generated.text/event-stream
format until the request is completed.
COMPLETED
, retrieve the response using:
Endpoint Type | Rate Limit | Burst Limit |
---|---|---|
Submit to Queue | 10 requests/second | 100 requests/minute |
All Other Endpoints | 100 requests/second | 1,800 requests/minute |
403 Forbidden
response. We recommend implementing a retry mechanism with exponential backoff to handle these cases.