Overview
Inference for realtime AI and long-running AI agents: an OpenAI-compatible API with realtime, priority, flex, and batch windows on one fleet. Quickstart, models, pricing, and full HTTP reference.
Inference API
sference is an inference stack for open models, exposed as one OpenAI-compatible HTTP API. It serves both shapes of production AI from the same fleet: realtime AI, where a user is waiting on the response, and long-running AI agents, where work spans many model calls and nobody is waiting on any single one.
Three processing modes carry that range, and you pick per request:
| Mode | Window | For |
|---|---|---|
| realtime | immediate | Interactive requests, the turn a user is waiting on |
| priority | immediate — jumps the queue | Latency-critical traffic that cannot wait out congestion, at 1.3 × list |
| flex | up to 30 minutes | Latency-tolerant sync work: background steps, enrichment, summarization |
| batch | up to 24 hours | Large jobs, evals, backfills, offline pipelines |
All four run on the same endpoints, the same models, and the same GPU fleet — a scheduling priority per request rather than a separate deployment per workload. Pin model versions and keep a compliance-grade trail, without replatforming how your team already calls models.
Quickstart · Models · Pricing · API Reference
Start here
Quickstart
API key, CLI install, and your first response, curl optional.
Models
Catalog ids, capabilities, context windows, and how to pin versions.
Pricing
Per-token rates, the three windows, cached input, and what counts as a token.
Support matrix
One-page grid: every endpoint, field, and window.
Developer quickstart
Export an API key and make a realtime request. It is OpenAI-shaped, so an existing client needs only a new base URL and model id:
export SFERENCE_API_KEY="sk_..."
curl https://api.sference.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SFERENCE_API_KEY" \
-d '{"model":"deepseek-ai/DeepSeek-V4.1-Flash-1017","enable_thinking":false,"messages":[{"role":"user","content":"Say hello in one sentence."}]}'Prefer the CLI? Install it and authenticate:
curl -fsSL https://raw.githubusercontent.com/s-ference/sference/main/install.sh | sh
sference auth login # opens the console to approve this deviceStep-by-step: Quickstart. Prefer Python? See Python SDK.
Build an agent
Agent loops are the workload the platform is shaped for: the turn a user waits on runs realtime, the steps behind it run flex or batch, and one bill covers both.
Build with agent frameworks
LangChain, the OpenAI Agents SDK, and the Anthropic Agent SDK, plus structured output and scale patterns.
SferenceCode
Run Claude Code, Pi, opencode, Codex, or Cursor on open models, one command each.
Prompt caching
The largest lever on an agent's bill: keep the prefix stable, pin the worker.
Max queue wait
Bound the wait and fail over instead of hanging.
Choose a workload
OpenAI Responses API
Realtime and background responses, events, and `/v1/streams` for incremental output.
Batch API
Enqueue large jobs on the 24h window: chat or Responses row bodies, poll status, download JSONL.
Streams
Group related requests: one window, one cost rollup, a resumable cursor.
Requests at scale
Fan out concurrent background responses, or submit one batch.
Webhooks
Get a callback when a background response finishes instead of polling.
Structured outputs
Constrain the response to a JSON schema.
Images and vision
Which models accept images, the request shapes, and how they bill.
Max queue wait
Fail fast under congestion; adopt sference as a preferred provider.
Operate it
Usage & analytics
Spend, tokens, and per-request activity, grouped by model, key, member, and department.
API compatibility
What each surface honors, and what it ignores.
LLM & agent access
Markdown views, llms.txt, and the OpenAPI spec for coding agents.
HTTP reference
Every path and schema generated from our OpenAPI spec, including control plane routes.
Bring your existing client
Anthropic Messages API
POST /v1/messages: point the anthropic SDK at sference and run open models.
OpenAI Chat API
POST /v1/chat/completions: the OpenAI-shaped path most clients already speak.
OpenAI Responses API
POST /v1/responses: stateful responses, events, and background mode.
Claude Code
One command to run Claude Code on open models.
OpenAI-shaped clients need only a base-URL change: /v1/chat/completions and /v1/responses are OpenAI-compatible. POST /v1/embeddings is available on dedicated deployments only. It serves dedicated or custom models, not the public catalog. For classification and routing, /v1/decisions returns probabilities for structured questions instead of generated text.
Product & compliance
For positioning, regulation, and workloads, use the marketing site and use cases.