Elastic Inference API
OpenAI-compatible API for our curated selection of the best production models through Hypervize’s global serverless inference network.
Elastic Inference API
Serverless OpenAI-compatible chat completions and embeddings. You send requests; we route them across our global inference network. No infrastructure on your part.
We maintain a focused catalog of production-ready models — not every model available, only the ones that work reliably at scale. See Supported Models and Code Examples.
Endpoint
POST https://hypervize.tech/api/chat/completionsAll requests must include a valid Authorization: Bearer hvz_live_... header (or be made from the dashboard while logged in with at least one active key).
For most applications use the standard endpoint above. For model control at the API key level (agents and tools), see The /b/ Endpoint (Model Pinning).
The /b/ Endpoint (Model Pinning)
In addition to the primary POST /api/chat/completions endpoint, Hypervize offers:
POST https://hypervize.tech/api/b/chat/completionsThis path is for cases where you need to manage or swap the underlying model at the API key level, without changing calling code.
How Model Pinning Works
When you call /api/b/chat/completions:
- We authenticate with the provided
Authorization: Bearer hvz_live_...key (same as the standard endpoint). - We look up the pinned model configured for that API key.
- If a model is pinned, we override the
modelfield from your request body with the pinned value. - The request continues as a normal Elastic Inference call (including tools, usage tracking, and billing).
If no model is pinned to the key, /b/ behaves identically to the standard endpoint.
Pinning is applied as soon as the request is accepted, so the rest of the pipeline always sees the pinned model — not whatever the client sent.
Primary Use Case: Tools, Agents, and Platforms like OpenClaw
Agent frameworks and workflow tools often:
- Hardcode a model name in configuration or source.
- Generate inference calls programmatically across many agents or workers.
- Need different models per environment or customer.
- Want to upgrade, experiment, or roll back models centrally.
With the /b/ path you can:
- Create a dedicated API key for the integration (e.g. "OpenClaw Production").
- Pin the desired model (e.g.
claude-sonnet-5ormistral-large-3) to that key. - Point the deployment at
https://hypervize.tech/api/b/chat/completions. - The client can send any model value (or none) — Hypervize forces the pinned model.
- When you switch models, update the pin on the key in the dashboard. No code changes or restarts on the client side.
This pattern is useful for:
- Centralized model governance — Enforce models for cost, latency, or compliance.
- Agent fleets — Same calling code, different pinned models via separate keys.
- Third-party or embedded integrations — Calling code outside your control; you still control the model.
- Rapid iteration — A/B test, canary, or revert by updating the pin.
All normal Elastic features remain available: server-managed tools (when streaming), platform tools, vision, usage reporting, and prepaid billing.
Configuring Pinned Models
Set or change the pinned model for any of your API keys in Settings → Keys (Access Keys). The value accepts any display name or internal identifier from the Supported Models catalog.
Updates take effect on the next request using that key.
Choosing Between Endpoints
| Endpoint | Best For | Model Selection Controlled By |
|---|---|---|
/api/chat/completions | Applications that own their model logic | Per-request model field |
/api/b/chat/completions | Agents, tools, and integrations needing central control | API key configuration (pinned model) |
/api/d/{endpoint-id}/... | Dedicated private deployments | The endpoint itself |
Standard and /b/ endpoints share the same API keys, authentication, rate limiting, and billing semantics.
Request Format
The API is OpenAI Chat Completions compatible. Supported fields:
{
"model": "claude-sonnet-5",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Hello!" }
],
"max_tokens": 1024,
"temperature": 0.7,
"top_p": 0.9,
"stream": true,
"stop": ["\n\n"]
}Important Model Name Handling
Prefer human-friendly display names from the catalog (e.g., claude-sonnet-5, llama-3-3-70b-instruct, grok-4.3, kimi-k3).
Hypervize maps display names to backend identifiers. You may also pass the raw provider identifier if needed.
See Supported Models for the full list with pricing and context windows.
Provider rate limits and model fallbacks
For some catalog models, if the primary upstream provider is rate-limited or temporarily unavailable, Hypervize may automatically serve an alternate catalog model so the request can still complete.
- Fallbacks are not guaranteed on every model or every error type.
- When a fallback serves, the response
modelfield (and metered usage) reflect the model that actually ran, not only the name you requested. You are billed at that model’s catalog rates. See Billing & Payments. - If no fallback is available or all attempts fail, you get a normal error (often 429 or 5xx). Retry with exponential backoff. See Errors.
Clients should treat the returned model (and usage) as authoritative for what ran.
Streaming Responses (Recommended)
Hypervize Inference strongly encourages streaming for production use cases.
Responses are standard Server-Sent Events:
data: {"id":"...","choices":[{"delta":{"content":"Hello"},"index":0}],"model":"...","created":...}
data: {"id":"...","choices":[{"delta":{"content":" world"},"index":0}],"model":"...","created":...}
...
data: {"usage":{"prompt_tokens":12,"completion_tokens":48,"total_tokens":60}}
data: [DONE]The final usage object (when present) contains the token counts used for metering.
Non-Streaming Responses
You may set "stream": false (or omit the field). You receive a single JSON response with the full assistant message and usage statistics.
Streaming is often nicer for UIs (tokens appear as they are generated). Stream and non-stream are both supported for normal completions and plain client tools.
Request wall clock (important for agents)
Each elastic completion request is subject to a platform wall-clock limit of about 13 minutes (serverless function max duration). That covers the whole turn: model time, tool waits, and managed re-invokes when platform/webhook tools run on our side.
| Workload | Guidance |
|---|---|
| Interactive chat / typical agent steps | Stay well under ~13 minutes per HTTP request |
| Long multi-step agents | Split into multiple API calls (client tool loop), not one multi-hour hold |
| Hours-long or bulk jobs | Not this API’s job — plan for a future batch / async jobs product (submit + poll), not one blocking completion |
If a request hits the wall clock, the call fails; retry or redesign the loop rather than extending a single request indefinitely.
Supported Features
- Chat messages (system / user / assistant, including multi-turn)
- Vision / image inputs (on models that support them)
- Streaming and non-streaming
max_tokens,temperature,top_p,stop- Token usage reporting in the final chunk
- Full tool / function calling (plain OpenAI schemas, webhooks, and platform tools)
- Mode A plain client-driven tools: streaming and non-streaming (
chat.completionwithtool_calls). Plain tools in the request do not auto-attach platform tools unless hybrid is enabled (see Tool Calling). - Mode B server-managed tools (webhooks + platform tools such as Athena, Vesper, Herald, Pandora, Iris): stream or non-stream; non-stream returns one aggregated
chat.completionafter the managed loop. Whole loop still counts against the ~13 minute wall clock. Chronos is a scheduling product flag — it is not injected as a model-callable tool.
- Mode A plain client-driven tools: streaming and non-streaming (
See the Tool Calling guide and Platform Tools for details.
Limited / Not Yet Supported
- JSON mode / response format enforcement (limited support)
- Logprobs
- Seed / deterministic sampling guarantees
- Audio / speech inputs (supported on certain models; availability varies)
Embeddings
Hypervize supports the standard OpenAI Embeddings API for catalog models designed for vector embeddings (e.g. Cohere).
Endpoint
POST https://hypervize.tech/api/embeddingsRequest
{
"model": "cohere.embed-v4",
"input": "The quick brown fox jumps over the lazy dog.",
"encoding_format": "float"
}encoding_format is optional: "float" (default) or "base64".
input can be a single string or an array of strings.
Response
Standard OpenAI embeddings response:
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.1, -0.2]
}
],
"model": "cohere.embed-v4",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}Using the OpenAI SDK
from openai import OpenAI
client = OpenAI(
base_url="https://hypervize.tech/api",
api_key="hvz_live_..."
)
resp = client.embeddings.create(
model="cohere.embed-v4",
input=["text one", "text two"]
)
for item in resp.data:
print(item.embedding[:5]) # first few dimensionsEmbeddings are billed by prompt tokens (input only) against your prepaid balance. See the model entry in Supported Models for the per-million-token rate.
Pricing (Elastic)
Pricing is transparent and usage-based. You are charged per million input and output tokens (or per image for vision models).
Current pricing for each model is visible in:
- The model selector in the dashboard
- The Supported Models page
- The final
usagechunk of streaming responses
Error Handling
All errors return a JSON body with an error field:
{
"error": "Invalid API key"
}Common status codes:
401— Missing or invalid Authorization header / key403— Valid key but no inference keys on account, or other permission issue500— Internal error (rare — check status page or contact support)
Full error reference: Errors & Troubleshooting
Best Practices
- Keep each request under the ~13 minute wall clock; multi-step agents should multi-call.
- Handle the
usageobject for cost attribution. - Set reasonable
max_tokensvalues (many models have different defaults). - Use catalog display names rather than raw provider IDs for future-proofing.
- Implement exponential backoff on 429/5xx responses.
Hypervize Elastic is deliberately opinionated. Our catalog focuses on the highest-quality, most reliable models rather than maximizing the number of options. For any model not in the catalog, use Dedicated Inference.
Billing
Elastic inference (tokens) and Hypervize-managed tool calls are charged against your prepaid balance. New accounts start with 3 free queries. Opening Hypervize Chat for the first time may grant additional free messages (shared with API usage).
Tool calls are metered per execution (see published per-call prices) and apply whether you are using elastic or dedicated inference. See the Tool Calls section in Billing & Payments.
See Billing & Payments for top-ups, auto top-up, balance enforcement, and how elastic billing differs from dedicated weekly post-pay.