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.

SurfaceEndpointShapeReference
OpenAI Chat APIPOST /v1/chat/completionsOpenAIOpenAI Chat API
OpenAI Responses APIPOST /v1/responsesOpenAIOpenAI Responses API
Anthropic Messages APIPOST /v1/messagesAnthropicAnthropic Messages API

Which one

You haveUseWhy
OpenAI-shaped code, most SDKs and frameworksOpenAI Chat APIThe widest compatibility; every OpenAI client speaks it. Also takes service_tier: "flex"
A new integration, or you want background executionOpenAI Responses APIAdds background: true, streams, and the 24h window
Anthropic-shaped code, Claude Code, ChatAnthropicAnthropic Messages APINative Anthropic bodies; no translation layer. Realtime only
Thousands of rows to run offlineBatchesOne 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

CapabilityOpenAI Chat APIOpenAI Responses APIAnthropic 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

SurfaceBase 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 no gpt-* or claude-* aliases. GET /v1/models lists 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_s bounds the wait on all three, so you can fail over instead of hanging. See Max queue wait.