Eden AI
Eden AI is available on the Spanway gateway through the edenai/ model prefix. You register an Eden AI model once in the gateway's config.yaml (or through the Admin UI), and every application then calls it through the gateway's OpenAI-compatible API with a Spanway virtual key. The provider credential stays on the gateway, and every request is authenticated, rate limited, logged and costed in the same way as any other provider.
The gateway translates requests and responses for Eden AI natively, so provider specific parameters and errors are mapped to the OpenAI format for you.
Supported endpoints
The gateway's endpoint support matrix lists the following endpoints for Eden AI. Each link explains the request shape and the gateway features that apply to that endpoint.
- OpenAI Chat Completions API (
/chat/completions) - Anthropic Messages API (
/messages) - OpenAI Responses API (
/responses) - OpenAI Embeddings API (
/embeddings) - OpenAI Images Generations API (
/images/generations) - OpenAI Audio Transcription API (
/audio/transcriptions) - OpenAI Text-to-Speech API (
/audio/speech) - OpenAI Videos API (
/videos)
Environment variables
The Eden AI integration reads the following environment variables. Variables marked as required are the ones the gateway's environment validation checks for this provider. You can also pass any of these values directly in spanway_params (for example api_key or api_base), and the per-model value wins over the environment.
| Variable | Required | Purpose |
|---|---|---|
EDENAI_API_KEY | Yes | Credential the gateway sends to the provider |
OPENAI_LIKE_API_BASE | No | Overrides the provider base URL |
OPENAI_LIKE_API_KEY | No | Credential the gateway sends to the provider |
EDENAI_API_BASE | No | Overrides the provider base URL |
Reference a variable from config.yaml with the os.environ/ prefix so that the secret never appears in the file itself. Secrets can also come from a secret manager, see secret managers.
Register a model on the gateway
Add an entry to model_list in config.yaml. The model_name is the public name your applications send, and spanway_params.model tells the gateway which provider and upstream model to call.
model_list:
- model_name: my-model
spanway_params:
model: "edenai/<model-name>"
api_key: os.environ/EDENAI_API_KEY
Start the gateway with this file:
export EDENAI_API_KEY="..."
spanway --config config.yaml
Spanway is in private preview. The container images and Helm charts will be published soon. To request access, write to sales@spanway.ai, and preview customers receive download instructions in their onboarding pack.
To add the model without a restart, call POST /model/new with the same model_name and spanway_params, or use the Models + Endpoints page in the Admin UI. See model management for details.
Call the model through the gateway
Send requests to the gateway's /v1/chat/completions endpoint with a virtual key. The gateway maps the public model name to the Eden AI deployment, translates the request, and returns the response in the OpenAI format.
curl -X POST http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "my-model",
"messages": [{"role": "user", "content": "Summarize what an AI gateway does in two sentences."}]
}'
The same request works from any OpenAI SDK by setting the base URL to http://localhost:4000 and the API key to a Spanway virtual key. Create keys with POST /key/generate as described in virtual keys.
Pricing
The price map bundled with this Spanway build has no entries for Eden AI. Without a price the gateway still serves and logs requests, but it cannot compute their cost. Add input_cost_per_token and output_cost_per_token to the deployment to enable spend tracking, as described in custom pricing.