Hypereal AIHypereal AI
Video StudioVideo AgentMedia APICoding LLMsMCP
Video APISeedance 2.0KlingVeo 3.1Gemini Omni VideoHappyHorse 1.0All Models →
Image APIGPT Image 2Nano BananaFLUXMidjourney AlternativeAll Models →
LLM APIClaude OpusClaude SonnetClaude FableGPT-5.5GPT-5.5 ProGemini 3 ProGemini 3.5 FastGemini 3.5 ThinkingDeepSeekAll Models →
Pricing
API ReferenceCookbook
EnterpriseAffiliateAboutChangelogContact

Pricing

Cookbook

Drop-in recipes for the official SDKs.

Point the official openai or @anthropic-ai/sdk at https://hypereal.cloud/api/v1 with your ck_ key. Streaming, tool calling, and structured outputs work the same code as against the upstream APIs — no shims, no wrappers.

Get an API key Full reference Pricing

On this page

  • 1 · Streaming chat completions
  • 2 · Tool / function calling
  • 3 · Structured outputs (JSON Schema)
  • 4 · Anthropic Messages SDK
  • 5 · Legacy JSON mode

Streaming chat completions

SSE chunks pass through unmodified — same delta / finish_reason / data: [DONE] terminator the OpenAI SDK already knows how to parse.

stream.tsTypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.HYPEREAL_API_KEY, // ck_...
  baseURL: "https://hypereal.cloud/api/v1",
});

const stream = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Write a haiku about caching." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
stream.pyPython
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["HYPEREAL_API_KEY"],  # ck_...
    base_url="https://hypereal.cloud/api/v1",
)

stream = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Write a haiku about caching."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content or ""
    print(delta, end="", flush=True)

Tool / function calling

tools, tool_choice, and parallel_tool_calls are forwarded verbatim. tool_calls in the response (and stream deltas) come back unchanged.

tools.tsTypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.HYPEREAL_API_KEY,
  baseURL: "https://hypereal.cloud/api/v1",
});

const res = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "What's the weather in Tokyo?" }],
  tools: [
    {
      type: "function",
      function: {
        name: "get_weather",
        description: "Get the current weather for a city",
        parameters: {
          type: "object",
          properties: { city: { type: "string" } },
          required: ["city"],
        },
      },
    },
  ],
  tool_choice: "auto",
});

console.log(res.choices[0].message.tool_calls);
// → [{ id: "call_...", function: { name: "get_weather", arguments: '{"city":"Tokyo"}' } }]
tools.pyPython
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["HYPEREAL_API_KEY"],
    base_url="https://hypereal.cloud/api/v1",
)

res = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What's the weather in Tokyo?"}],
    tools=[{
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a city",
            "parameters": {
                "type": "object",
                "properties": {"city": {"type": "string"}},
                "required": ["city"],
            },
        },
    }],
    tool_choice="auto",
)

print(res.choices[0].message.tool_calls)

Structured outputs

Pass response_format with type: json_schema, name, strict, schema. Schemas are enforced upstream — the model returns a string you can JSON.parse with confidence.

structured.tsTypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.HYPEREAL_API_KEY,
  baseURL: "https://hypereal.cloud/api/v1",
});

const res = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [
    { role: "user", content: "Extract: Bill ordered 3 cappuccinos." },
  ],
  response_format: {
    type: "json_schema",
    json_schema: {
      name: "order",
      strict: true,
      schema: {
        type: "object",
        properties: {
          customer: { type: "string" },
          item: { type: "string" },
          quantity: { type: "integer" },
        },
        required: ["customer", "item", "quantity"],
        additionalProperties: false,
      },
    },
  },
});

const order = JSON.parse(res.choices[0].message.content!);
// → { customer: "Bill", item: "cappuccino", quantity: 3 }
structured.pyPython
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["HYPEREAL_API_KEY"],
    base_url="https://hypereal.cloud/api/v1",
)

res = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Extract: Bill ordered 3 cappuccinos."}],
    response_format={
        "type": "json_schema",
        "json_schema": {
            "name": "order",
            "strict": True,
            "schema": {
                "type": "object",
                "properties": {
                    "customer": {"type": "string"},
                    "item":     {"type": "string"},
                    "quantity": {"type": "integer"},
                },
                "required": ["customer", "item", "quantity"],
                "additionalProperties": False,
            },
        },
    },
)

import json
order = json.loads(res.choices[0].message.content)

Anthropic Messages SDK

The Anthropic SDK works against /v1/messages with the same ck_ key. Extended thinking, tool use, and streaming are all supported.

anthropic.tsTypeScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.HYPEREAL_API_KEY, // ck_...
  baseURL: "https://hypereal.cloud/api/v1",
});

const res = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain MapReduce in one tweet." }],
});

console.log(res.content[0].type === "text" ? res.content[0].text : "");
anthropic.pyPython
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["HYPEREAL_API_KEY"],
    base_url="https://hypereal.cloud/api/v1",
)

res = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain MapReduce in one tweet."}],
)

print(res.content[0].text)

Legacy JSON mode

If you don't have a schema yet, response_format: { type: 'json_object' } still works for older code paths.

json-object.tsTypeScript
// Legacy mode — no schema, just "valid JSON".
const res = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [
    { role: "system", content: "Respond ONLY with valid JSON." },
    { role: "user",   content: "Give me a recipe for pasta carbonara." },
  ],
  response_format: { type: "json_object" },
});

Other passthrough fields

The gateway forwards seed, n, stop, logprobs, top_logprobs, presence_penalty, frequency_penalty, parallel_tool_calls, service_tier, and metadata verbatim — anything the OpenAI Chat Completions spec accepts, you can send.

Endpoint base: https://hypereal.cloud/api/v1 · Auth: Authorization: Bearer ck_... or x-api-key: ck_... · Billing: pay-as-you-go credits, 100 credits = $1 USD. See full reference for model IDs and per-MTok pricing.
LogoHypereal AI
All systems normal
LLM API
  • Hypereal SDK
  • MCP Server
  • Enterprise API
  • All LLM Models
  • Claude Fable 5
  • Claude Opus 4.7
  • Claude Sonnet 4.6
  • GPT-5.5
  • Claude Haiku 4.5
  • GPT-5.5 Pro
  • Gemini 3.1 Pro Preview
  • Gemini 3.5 Thinking
  • Gemini 3.5 Fast
  • DeepSeek V4 Pro
  • Kimi K2.6
  • GLM 5.2
  • Claude API in China
  • OpenAI API in China
AI API
  • AI API Overview
  • Seedance 2.0 API
  • Kling 3.0 API
  • Veo 3.1 API
  • FLUX API
  • GPT Image 2 API
  • vs WaveSpeed
  • vs fal.ai
  • vs Replicate
  • vs KIE.ai
  • vs OpenRouter
  • vs Together AI
  • vs SiliconFlow
  • Midjourney Alternative
  • Higgsfield Alternative
  • OpenRouter Alternative
Video Models
  • Google Veo 3.1 API
  • Kling 3.0 API
  • Kling O3 Pro API
  • Seedance 2.0 API
  • HappyHorse 1.0 API
  • WAN 2.7 API
  • WAN Video API
  • Grok Video API
  • Hunyuan Video API
  • PixVerse V6 API
  • Pika Video API
  • Luma Dream Machine API
  • MiniMax Video API
  • Vidu Video API
  • Gemini Omni Video API
Image Models
  • NanoBanana 2 API
  • FLUX 2 API
  • GPT Image 1 API
  • Grok Image API
  • SeeDream V5 API
  • Imagen 4 API
  • Ideogram API
  • Recraft API
  • DALL-E 3 API
  • Stable Diffusion API
  • Gemini Image API
Tools
  • Face Swap API
  • Video Face Swap API
  • Virtual Try-On API
  • AI Talking Avatar API
  • Lip Sync API
  • OmniHuman Avatar API
  • Tripo3D H3.1 API
  • ElevenLabs TTS API
  • Fish Audio TTS API
  • Whisper STT API
  • Lyria Music API
Generators
  • Video Agent
  • AI Image Generator
  • AI Video Generator
Collections
  • Best Video Models
  • Best Image Models
  • Seedance 2.0
  • WAN 2.7
  • Qwen Image 2
  • Grok AI
  • Seedance 1.5
  • Motion Control
  • Content Detection
  • Object Detection
Company
  • About
  • Docs
  • Hypereal SDK
  • Cookbook
  • Changelog
  • Blog
  • Contact
  • FAQ
  • Roadmap
  • Enterprise
  • Affiliate Program
  • Be a Creator
  • Developer Program
Legal
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Cookie Policy
  • Pricing
  • All Models
  • Sitemap
  • Status
© Copyright 2026. All Rights Reserved.
TwitterGitHubLinkedInYouTubeEmail