API surfaces
sference serves three request shapes — the OpenAI Chat API, the OpenAI Responses API, and the Anthropic Messages API — over one catalog, one key, and one bill.
API surfaces
sference speaks three request shapes. Pick the one your code already uses; all three reach the same models, the same key, and the same billing surface.
| Surface | Endpoint | Shape | Reference |
|---|---|---|---|
| OpenAI Chat API | POST /v1/chat/completions | OpenAI | OpenAI Chat API |
| OpenAI Responses API | POST /v1/responses | OpenAI | OpenAI Responses API |
| Anthropic Messages API | POST /v1/messages | Anthropic | Anthropic Messages API |
Which one
| You have | Use | Why |
|---|---|---|
| OpenAI-shaped code, most SDKs and frameworks | OpenAI Chat API | The widest compatibility; every OpenAI client speaks it. Also takes service_tier: "flex" |
| A new integration, or you want background execution | OpenAI Responses API | Adds background: true, streams, and the 24h window |
Anthropic-shaped code, Claude Code, ChatAnthropic | Anthropic Messages API | Native Anthropic bodies; no translation layer. Realtime only |
| Thousands of rows to run offline | Batches | One job, one model, results as JSONL on the 24h window |
All four share one catalog, one API key, and one billing surface. The three request shapes are OpenAI- or Anthropic-compatible, so switching is a base URL and a model id — no code changes. /v1/messages is realtime only; see Not supported.
What each surface supports
| Capability | OpenAI Chat API | OpenAI Responses API | Anthropic Messages API |
|---|---|---|---|
| Realtime | ✅ | ✅ | ✅ |
Flex (service_tier: "flex") | ✅ | ✅ | ❌ |
| Background / 24h window | ❌ | ✅ | ❌ |
| Streaming | ✅ | ✅ | ✅ |
| Tools | ✅ | ✅ | ✅ |
| Structured output | ✅ response_format | ✅ text.format | ❌ |
| Vision | ✅ | ✅ | ✅ |
| Reasoning control | ✅ | ✅ | ✅ |
prompt_cache_key | ✅ | ✅ | ❌ |
max_queue_wait_s | ✅ | ✅ | ✅ |
Streams (metadata.stream_id) | ❌ | ✅ | ❌ |
| Webhooks | ✅ | ✅ | ❌ |
The full field-by-field grid is on API compatibility, and the single-page endpoint list is on the Support matrix.
Base URLs
| Surface | Base URL |
|---|---|
| OpenAI-shaped (OpenAI Chat API, OpenAI Responses API) | https://api.sference.com/v1 |
| Anthropic-shaped (Anthropic Messages API) | https://api.sference.com |
One API key (sk_...) authenticates all three. /v1/messages accepts x-api-key as well as Authorization: Bearer; the OpenAI-shaped surfaces use the bearer header.
Common to all three
- Model ids are catalog ids —
zai-org/GLM-5.3,moonshotai/Kimi-K3. There are nogpt-*orclaude-*aliases.GET /v1/modelslists what your key can call. - The API is stateless. Every request is answered from the body you send; there is no server-side conversation to point at. Pass the full conversation each turn.
- Prefix caching is automatic. Keep the stable part of the prompt first; cached tokens bill at the cached-input rate. See Prompt caching.
max_queue_wait_sbounds the wait on all three, so you can fail over instead of hanging. See Max queue wait.
Pricing
How sference bills inference: per-token rates for every catalog model across the realtime, flex, and batch windows, cached input, and what counts as a token.
OpenAI Chat API
POST /v1/chat/completions on sference: the OpenAI Chat Completions shape, with flex processing, tools, structured output, vision, and streaming.