Skip to main content

OCI

OCI is available on the Spanway gateway through the oci/ model prefix. You register an OCI 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 OCI 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 OCI. Each link explains the request shape and the gateway features that apply to that endpoint.

Model types​

The bundled price map lists 44 OCI models across these modes: Chat, Embedding. The mode decides which gateway endpoint a model is meant for, and it is also used by the gateway's health checks to send the right kind of test request.

Credentials​

The OCI integration does not read a provider specific environment variable. Set api_base, and api_key when the server requires one, directly in spanway_params. Use the os.environ/ prefix to pull those values from the environment or from a configured secret manager.

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: meta.llama-4-scout-17b-16e-instruct
spanway_params:
model: oci/meta.llama-4-scout-17b-16e-instruct

Start the gateway with this file:

spanway --config config.yaml
Private preview

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 OCI 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": "meta.llama-4-scout-17b-16e-instruct",
"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.

Models and pricing​

The table lists every OCI model in the gateway's bundled price map. Prices are shown in US dollars per 1 million tokens, computed from the per-token values the gateway uses for spend tracking. Context window sizes are the provider limits recorded in the same file. Capabilities are the supports_* flags set for each model.

info

Prices come from the price map bundled with this Spanway build. They are used to calculate the spend recorded for each request, key, team and user. Your negotiated rates may differ, and you can override them per deployment with custom pricing.

Model (model value)ModeMax input tokensMax output tokensInput per 1M tokensOutput per 1M tokensOther pricingCapabilities
oci/cohere.command-a-03-2025Chat256,0004,000$1.56$1.56tools
oci/cohere.command-a-reasoningChat256,0008,192$1.56$1.56
oci/cohere.command-a-reasoning-08-2025Chat256,0004,000$1.56$1.56tools
oci/cohere.command-a-translate-08-2025Chat256,0004,000$0.09$0.09
oci/cohere.command-a-visionChat256,0008,192$1.56$1.56tools, vision
oci/cohere.command-a-vision-07-2025Chat128,0004,000$1.56$1.56tools, vision
oci/cohere.command-latestChat128,0004,000$1.56$1.56tools
oci/cohere.command-plus-latestChat128,0004,000$1.56$1.56tools
oci/cohere.command-r-08-2024Chat128,0004,000$0.15$0.15tools
oci/cohere.command-r-plus-08-2024Chat128,0004,000$1.56$1.56tools
oci/cohere.embed-english-image-v3.0Embedding512$0.1$0
oci/cohere.embed-english-light-image-v3.0Embedding512$0.1$0
oci/cohere.embed-english-light-v3.0Embedding512$0.1$0
oci/cohere.embed-english-v3.0Embedding512$0.1$0
oci/cohere.embed-multilingual-image-v3.0Embedding512$0.1vision
oci/cohere.embed-multilingual-light-image-v3.0Embedding512$0.1$0
oci/cohere.embed-multilingual-light-v3.0Embedding512$0.1$0
oci/cohere.embed-multilingual-v3.0Embedding512$0.1$0
oci/cohere.embed-v4.0Embedding128,000$0.12$0
oci/google.gemini-2.5-flashChat1,048,57665,536$0.15$0.6tools, vision, reasoning, structured output, PDF input, audio in, video in
oci/google.gemini-2.5-flash-liteChat1,048,57665,536$0.075$0.3tools, vision, structured output, PDF input, audio in, video in
oci/google.gemini-2.5-proChat1,048,57665,536$1.25$10.00tools, vision, reasoning, structured output, PDF input, audio in, video in
oci/meta.llama-3.1-8b-instructChat128,0004,000$0.72$0.72tools
oci/meta.llama-3.1-70b-instructChat128,0004,000$0.72$0.72tools
oci/meta.llama-3.1-405b-instructChat128,0004,000$10.68$10.68tools
oci/meta.llama-3.2-11b-vision-instructChat128,0004,000$2.00$2.00tools, vision
oci/meta.llama-3.2-90b-vision-instructChat128,0004,000$2.00$2.00tools, vision
oci/meta.llama-3.3-70b-instructChat128,0004,000$0.72$0.72tools
oci/meta.llama-3.3-70b-instruct-fp8-dynamicChat128,0004,000$0.72$0.72tools
oci/meta.llama-4-maverick-17b-128e-instruct-fp8Chat1,048,5768,192$0.72$0.72tools, vision
oci/meta.llama-4-scout-17b-16e-instructChat10,485,7608,192$0.72$0.72tools
oci/openai.gpt-5Chat272,000128,000$1.25$10.00tools, vision, reasoning, structured output
oci/openai.gpt-5-miniChat272,000128,000$0.25$2.00tools, vision, reasoning, structured output
oci/openai.gpt-5-nanoChat272,000128,000$0.05$0.4tools, vision, reasoning, structured output
oci/xai.grok-3Chat131,072131,072$3.00$15.00tools
oci/xai.grok-3-fastChat131,072131,072$5.00$25.00tools
oci/xai.grok-3-miniChat131,072131,072$0.3$0.5tools
oci/xai.grok-3-mini-fastChat131,072131,072$0.6$4.00tools
oci/xai.grok-4Chat128,000128,000$3.00$15.00tools
oci/xai.grok-4-fastChat131,072131,072$5.00$25.00tools
oci/xai.grok-4.1-fastChat131,072131,072$5.00$25.00tools
oci/xai.grok-4.20Chat131,072131,072$3.00$15.00tools
oci/xai.grok-4.20-multi-agentChat131,072131,072$3.00$15.00tools
oci/xai.grok-code-fast-1Chat131,072131,072$5.00$25.00tools