API reference
The gateway implements the OpenAI REST API. Base URL: https://awsbee.com/api/v1. Authenticate with Authorization: Bearer bee_sk_…. Set model to a deployment name.
Endpoints
| Method & path | Description |
|---|---|
GET /models | Your deployments, with status, engine, source model, instance type and region. |
POST /chat/completions | Chat completion. Supports streaming, tools and JSON mode when the engine does. |
POST /completions | Text completion. |
POST /embeddings | Embeddings, for deployments that serve an embedding model. |
Streaming
Send "stream": true to receive server-sent events. The gateway adds stream_options.include_usage upstream so token counts are recorded; the final chunk carries usage.
curl
curl -N https://awsbee.com/api/v1/chat/completions \
-H "Authorization: Bearer $BEE_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"llama-3-1-8b-instruct","stream":true,
"messages":[{"role":"user","content":"Count to five."}]}'Response headers
x-bee-deployment names the deployment that served the request.
Errors
Errors use the OpenAI shape:
404
{ "error": { "message": "No deployment named \"x\". Available: …", "type": "invalid_request_error", "code": "model_not_found" } }| 401 | Missing, invalid or revoked API key. |
|---|---|
| 404 | No deployment with that name. |
| 429 | More than 600 requests per minute on one key. |
| 502 | The deployment did not answer. |
| 503 | The deployment is not running (launching, stopped, failed). |