API Overview#
The Rustbox API provides endpoints for submitting code, retrieving results, and receiving webhook notifications.
Base URL#
https://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#
| Method | Path | What it does |
|---|---|---|
POST | /api/submit | Submit code for execution |
GET | /api/result/{id} | Poll execution result |
GET | /api/languages | List supported languages |
GET | /api/health | Platform health + queue depth |
GET | /api/health/ready | Readiness 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: Configure endpoints on a project in the dashboard. Submissions made with API keys scoped to that project deliver results to active project webhooks.
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.