API docs
Use the same Bearer token pattern and request shape as OpenAI. The relay checks credits before forwarding and debits credits only after successful upstream responses.
curl https://api-aggregator.82-29-197-129.sslip.io/v1/chat/completions \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4-mini",
"messages": [
{"role": "user", "content": "Write a launch checklist"}
]
}'Endpoints
GET
/v1/models
List models exposed by the relay.
POST
/v1/chat/completions
Forward chat and coding requests to the configured upstream.
POST
/v1/images/generations
Forward image generation requests when enabled upstream.
POST
/v1/embeddings
Forward embedding requests when enabled upstream.
Runtime env
API_RELAY_UPSTREAM_BASE_URLAPI_RELAY_UPSTREAM_API_KEYAPI_RELAY_RATE_LIMIT_PER_MINUTEAPI_RELAY_CHAT_CREDITS_PER_REQUEST