API Overview#

The Rustbox API provides endpoints for submitting code, retrieving results, and receiving webhook notifications.

Base URL#

https://api.rustbox.orkait.com/api

Authentication#

Every request must include your API key in the X-API-Key header:

X-API-Key: rb_live_your_key_here

Missing or invalid keys return 401 Unauthorized. See Authentication for details.

Endpoints#

MethodPathWhat it does
POST/api/submitSubmit code for execution
GET/api/result/{id}Poll execution result
GET/api/languagesList supported languages
GET/api/healthPlatform health + queue depth
GET/api/health/readyReadiness probe

Three ways to get results#

Async (default): Submit, get back an ID, poll /api/result/{id} until it completes.

Sync: Add ?wait=true to the submit request. The server holds the connection open and returns the result directly when execution completes (or times out after 30s).

Webhooks: Include webhook_url and webhook_secret in your submission. The platform will POST the result to your URL with an HMAC-SHA256 signature when it is ready. Fire and forget.

Each pattern has a legitimate use case. Polling is simplest to implement on the client side. Sync mode is ideal for interactive playgrounds where latency matters. Webhooks are the right choice for batch processing where you submit hundreds of submissions and do not want to hold connections open.