Docs menu

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 openai package for Python or Node, or curl.
Shell
pip install openai   # Python
npm install openai   # Node and TypeScript

1. Set two environment variables

Shell
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:

JSON
{
  "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:

Python
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

SymptomLikely cause
401 UNAUTHORIZEDThe key is missing, revoked or copied with extra characters.
402 PAYMENT_REQUIREDThe workspace has no available credit or reached a spend limit. Add credits in Billing.
400 unknown_model or model_not_routablePick a routable ID from Models.
400 feature_unsupportedThe model cannot honor a requested tool, vision, audio or JSON feature.
404 on every requestSELDON_BASE_URL is missing /v1.
No row in Calls & usageThe request went to the provider directly. Check that the client uses SELDON_BASE_URL.

See Errors for every code.

Next steps