Get started
Route your first request
Point an OpenAI-compatible SDK at Seldon, send one request and confirm it in Calls & usage. It takes about five minutes.
Before your first request
Understand Seldon's current data handling.
Routing and retention
Seldon routes requests to configured model providers. Seldon retains audit, usage and trace data for billing, audit, reliability, debugging, security and product operation.
No resale or model training
Seldon does not resell prompts, outputs, traces, cached responses or API traffic, and does not use them to train generalized AI models.
Stored payloads and cache
Current behavior may store redacted request and response trace payloads and exact response-cache entries. Functions store their drafts, evaluation examples and execution records as private workspace content. Stored BYOK connections keep encrypted credentials in a dedicated vault. Transient BYOK headers are used for the request and are not stored.
Policy-aware routing
Privacy-forward controls such as provider.zdr, provider.data_collection = "deny" and cache.no_store can be used, but can fail with no_policy_compliant_provider when provider policy metadata is unknown.
What you need
- A Seldon account. Log in.
- An API key. The dashboard shows one on your first visit, and only once, so copy it then. Otherwise create a key under API keys.
- Available workspace credit. Add funds in Billing if needed.
- The official
openaipackage for Python or Node, or curl.
pip install openai # Python
npm install openai # Node and TypeScript1. Set two environment variables
export SELDON_BASE_URL="https://api.seldon-ai.com/v1"
export SELDON_API_KEY="sk-seldon-..."SELDON_BASE_URL includes /v1, just like the OpenAI SDKs' default base URL. SDKs append paths such as /chat/completions to it. Keep the key in your environment or a secret manager, not in source code.
2. Send a request
curl "$SELDON_BASE_URL/chat/completions" \
-H "Authorization: Bearer $SELDON_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-5.4-nano",
"messages": [
{
"role": "user",
"content": "Say hello from Seldon"
}
]
}'The examples use openai/gpt-5.4-nano, a model that is routable right now. Any routable ID from Models works.
3. Check the response
A successful response is a standard chat completion. Seldon adds its computed cost and cache accounting to usage without renaming any standard field. Trimmed example:
{
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello from Seldon!" },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 6,
"total_tokens": 18,
"computed_cost": "0.0000041",
"seldon_cache": {
"total_input_tokens": 12,
"uncached_input_tokens": 12,
"cached_read_tokens": 0,
"cache_write_tokens": 0,
"cache_hit_ratio": 0
}
}
}computed_cost is a decimal string in USD. Every response also carries an X-Seldon-Trace-Id header; include it when you contact support.
4. Confirm it in Calls & usage
Open Calls & usage. The request appears with its model, token counts, latency and computed cost.
To label the calling application in the App column, send an X-Title header:
client = OpenAI(
api_key=os.environ["SELDON_API_KEY"],
base_url=os.environ["SELDON_BASE_URL"],
default_headers={"X-Title": "my-app"},
)If something went wrong
See Errors for every code.
Next steps
- Optimize a repeated call with Functions. Routing traffic does not start optimization; you choose which calls to optimize.
- Streaming, tools and JSON
- Models and routing
- SDKs and frameworks