API สำหรับ coding และ LLM ระดับ Enterprise
ใช้ Hypereal API key เดียวสำหรับ coding agents, การรวม IDE, เครื่องมือภายใน และ production LLM workloads Enterprise API รองรับ OpenAI-compatible และ Anthropic-native และเปิดเผย model set ที่คัดสรรแล้วสำหรับทีมที่ต้องการ model ID ที่คาดเดาได้ การสร้างภาพ การออกบิล และ usage logs
Claude model ID ที่ลงท้ายด้วย -max (เช่น claude-opus-4-7-max) รองรับ เฉพาะผ่าน Claude Code CLI กับ Anthropic-native endpoint เท่านั้น การใช้โมเดลเหล่านี้กับ client อื่นหรือ wrapper จากบุคคลที่สามเป็นสิ่งต้องห้ามโดยเด็ดขาด และจะส่งผลให้คำขอถูกบล็อกและ API key ถูกระงับโดยไม่คืนเงิน ซึ่งรวมถึงแต่ไม่จำกัดเพียง Hermes, OpenClaw และเครื่องมือ proxy, replay หรือ account-pooling ที่คล้ายกัน โมเดลมาตรฐาน (ที่ไม่ใช่ -max) ไม่ได้รับผลกระทบและยังคงใช้งานได้กับทุก client
ใช้งานร่วมกับ Claude Code, coding agents, review bots, IDE tools และ automation ภายในที่ใช้ OpenAI หรือ Anthropic API อยู่แล้ว
Claude Opus 4.8, Claude Sonnet 4.7, Claude Haiku, GPT-5.5, Nano Banana 2, GPT Image 2, DeepSeek, Qwen และ Kimi พร้อมให้บริการผ่าน Hypereal model ID ที่เสถียร
สร้างภาพผ่าน managed chat completions endpoint เดียวกัน พร้อม multimodal response fields และการควบคุมการใช้งานระดับบัญชี
Hypereal API key เก็บ spending limits, model scoping, usage logs และ credit billing ไว้ใน control plane ระดับบัญชีเดียว
คำขอ Enterprise API ที่สำเร็จรวม latency insurance metadata และการชดเชย credits อัตโนมัติเมื่อใช้เวลานานผิดปกติ
เรียก chat completions
ใช้ managed base path สำหรับ Enterprise model catalog ที่คัดสรรแล้วและ Hypereal model ID ที่เสถียร
curl https://api.hypereal.cloud/v1/managed/chat/completions \
-H "Authorization: Bearer ck_..." \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-7",
"messages": [
{
"role": "system",
"content": "You are a senior software engineer."
},
{
"role": "user",
"content": "Review this TypeScript function for correctness."
}
],
"temperature": 0.2,
"max_tokens": 1200
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.HYPEREAL_API_KEY,
baseURL: "https://api.hypereal.cloud/v1/managed",
});
const completion = await client.chat.completions.create({
model: "claude-sonnet-4-7",
messages: [
{ role: "user", content: "Write a migration checklist for this PR." },
],
});
console.log(completion.choices[0]?.message?.content);const response = await client.responses.create({
model: "claude-sonnet-4-7",
input: "Create a concise migration checklist for this pull request.",
});
console.log(response.output_text);สร้างภาพผ่าน chat completions
ใช้ Nano Banana 2 กับ multimodal chat completions หรือเรียก OpenAI-compatible image generations endpoint สำหรับ GPT Image 2 ใช้ model ID nano-banana-2 และ gpt-image-2 Multimodal chat image fields ส่งคืนเป็น base64 data URLs ในขณะที่ image generations ส่งคืน OpenAI image response shape
curl https://api.hypereal.cloud/v1/managed/chat/completions \
-H "Authorization: Bearer ck_..." \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"messages": [
{
"role": "user",
"content": "Generate a clean product mockup of a glass banana sculpture on a white studio background."
}
],
"modalities": ["image", "text"],
"image_config": {
"aspect_ratio": "1:1",
"image_size": "1K"
}
}'curl https://api.hypereal.cloud/v1/managed/images/generations \
-H "Authorization: Bearer ck_..." \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A clean product mockup of a glass banana sculpture on a white studio background.",
"size": "1024x1024",
"quality": "standard"
}'ใช้ Anthropic-native endpoint
Claude Code และ Anthropic SDK clients ควรชี้ไปที่ Hypereal API root เนื่องจากพวกเขาต่อท้าย native messages path เอง HTTP clients แบบ raw สามารถเรียก managed messages path โดยตรง Tool use, thinking blocks, streaming และ prompt cache fields ยังคงสมบูรณ์
Claude model ID ที่ใช้ได้เฉพาะ CLI (suffix -max) ต้องใช้จาก Claude Code CLI เท่านั้น Third-party wrappers เช่น Hermes หรือ OpenClaw ไม่ได้รับอนุญาตบน tier นี้
export ANTHROPIC_BASE_URL="https://api.hypereal.cloud" export ANTHROPIC_AUTH_TOKEN="ck_..." export ANTHROPIC_API_KEY="" export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-8" export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4-7" export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-latest" export CLAUDE_CODE_SUBAGENT_MODEL="claude-sonnet-4-7"
# Claude Code CLI ONLY. # Claude model IDs for the official Claude Code CLI, not third-party wrappers. export ANTHROPIC_BASE_URL="https://api.hypereal.cloud" export ANTHROPIC_AUTH_TOKEN="ck_..." export ANTHROPIC_API_KEY="" export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-7-max" export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4-6-max" export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-max" export CLAUDE_CODE_SUBAGENT_MODEL="claude-sonnet-4-6-max"
curl https://api.hypereal.cloud/v1/managed/messages \
-H "anthropic-api-key: ck_..." \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-7",
"messages": [
{ "role": "user", "content": "Review this diff." }
],
"tools": [],
"max_tokens": 1200
}'Enterprise models ที่รองรับ
ราคาแสดงต่อหนึ่งล้าน token และเรียกเก็บผ่าน Hypereal Credits
| Model ID | ชื่อ | Context | Input | Cache read | Cache write | Output |
|---|---|---|---|---|---|---|
| claude-opus-4-8 | Claude Opus 4.8 | 1M | $5.25 | $0.525 | $6.56 | $26.25 |
| claude-sonnet-4-7 | Claude Sonnet 4.7 | 1M | $3.15 | $0.315 | $3.94 | $15.75 |
| claude-haiku-latest | Claude Haiku Latest | 200k | $1.05 | $0.105 | $1.31 | $5.25 |
| claude-opus-4-7-max | Claude Opus 4.7 | 200k | $5.25 | $0.525 | $6.56 | $26.25 |
| claude-opus-4-6-max | Claude Opus 4.6 (1M) | 1M | $5.25 | $0.525 | $6.56 | $26.25 |
| claude-opus-4-5-max | Claude Opus 4.5 | 200k | $5.25 | $0.525 | $6.56 | $26.25 |
| claude-sonnet-4-6-max | Claude Sonnet 4.6 | 200k | $3.15 | $0.315 | $3.94 | $15.75 |
| claude-sonnet-4-5-max | Claude Sonnet 4.5 | 200k | $3.15 | $0.315 | $3.94 | $15.75 |
| claude-haiku-4-5-max | Claude Haiku 4.5 | 200k | $1.05 | $0.105 | $1.31 | $5.25 |
| gpt-5-5 | GPT-5.5 | 1M | $5.25 | $0.525 | n/a | $31.50 |
| deepseek-v4-pro | DeepSeek V4 Pro | 1M | $0.4567 | $0.0038 | n/a | $0.9135 |
| qwen3-7-max | Qwen3.7 Max | 200k | $1.31 | $0.2625 | $1.64 | $3.94 |
| qwen3-7-plus | Qwen3.7 Plus | 1M | $0.42 | $0.084 | $0.525 | $1.68 |
| kimi-latest | Kimi Latest | 256k | $0.7182 | $0.1512 | n/a | $3.59 |
| nano-banana-2 | Nano Banana 2 | 131k | $0.525 | n/a | n/a | $3.15 |
| gpt-image-2 | GPT Image 2 | 272k | $8.40 | $2.10 | n/a | $31.50 |
curl https://api.hypereal.cloud/v1/managed/models \ -H "Authorization: Bearer ck_..."
รูปแบบ request และ response
Enterprise API รับรูปแบบ OpenAI chat completions request, รูปแบบ Responses API และ OpenAI image generation requests เมื่อโมเดลที่เลือกรองรับ Streaming, tools, structured outputs, temperature และการควบคุม max token ผ่านได้บนโมเดลที่รองรับ
{
"model": "claude-sonnet-4-7",
"messages": [
{ "role": "user", "content": "Refactor this function." }
],
"stream": true,
"max_tokens": 2000
}{
"hypereal": {
"billing": {
"model": "claude-sonnet-4-7",
"credits_charged": 12,
"balance_before": 1000,
"balance_after": 988
}
}
}Tools และ caching
Managed endpoint รักษา OpenAI-compatible tool calls, structured outputs, reasoning controls, streaming chunks และ prompt-cache fields ที่โมเดลที่เลือกรองรับ สำหรับ coding sessions ที่ยาวนาน ส่ง project context ที่เสถียรพร้อม cache controls และรักษา session ID ที่สม่ำเสมอ
const completion = await client.chat.completions.create({
model: "claude-sonnet-4-7",
messages: [{ role: "user", content: "Find the changed files." }],
tools: [
{
type: "function",
function: {
name: "list_changed_files",
description: "List changed files in the current repository.",
parameters: { type: "object", properties: {} },
},
},
],
tool_choice: "auto",
});curl https://api.hypereal.cloud/v1/managed/chat/completions \
-H "Authorization: Bearer ck_..." \
-H "Content-Type: application/json" \
-H "X-Hypereal-Cache: true" \
-H "X-Session-Id: coding-agent-session-123" \
-d '{
"model": "claude-sonnet-4-7",
"cache_control": { "type": "ephemeral" },
"messages": [
{ "role": "system", "content": "Stable project context..." },
{ "role": "user", "content": "Continue the refactor." }
],
"max_tokens": 1200
}'การควบคุม concurrency แบบ managed
คำขอ Enterprise API ผ่านการควบคุม admission แบบ managed ก่อนส่ง model call Gateway ใช้ short wait queues, model-level concurrency slots, account-level request-per-minute guards, capacity telemetry และ circuit breakers สำหรับ model paths ที่โหลดเกิน การควบคุมเหล่านี้ใช้เฉพาะกับ Enterprise API traffic และแสดงเป็น Hypereal response headers
| Surface | Primary models | Requests | Tokens | Queue |
|---|---|---|---|---|
| Text generation | gpt-5-5 | 15,000 RPM | 40,000,000 TPM | 15,000,000,000 tokens |
| Image generation | gpt-image-2 | 250 IPM | 8,000,000 TPM | n/a |
นี่คือเพดาน capacity แบบ managed ซึ่ง API key spending limits, model scoping, daily budgets, hourly budgets และ per-key model limits สามารถตั้งค่าให้ต่ำกว่าสำหรับการควบคุมภายในได้
X-Hypereal-Managed-Governor: active X-Hypereal-Managed-Model-Concurrency-Limit: 80 X-Hypereal-Managed-Model-Concurrency-Remaining: 79 X-Hypereal-Managed-Model-RPM-Limit: 15000 X-Hypereal-Managed-Model-RPM-Remaining: 14999 X-Hypereal-Capacity-Requests-Remaining: 9852 X-Hypereal-Managed-Image-IPM-Limit: 250 X-Hypereal-Managed-Image-IPM-Remaining: 249 X-Hypereal-Managed-Circuit: closed
การชดเชยอัตโนมัติสำหรับ request ที่ช้า
คำขอ Enterprise API มี request insurance สำหรับ calls ที่สำเร็จแต่ช้าผิดปกติ คำขอที่ล้มเหลวไม่ถูกเรียกเก็บเงิน ดังนั้นการชดเชยจะประเมินเฉพาะหลังจากคำขอที่สำเร็จมีการหัก credits แล้ว Non-streaming responses รวมการชำระในฟิลด์ hypereal.insurance Streaming responses เปิดเผย policy headers ทันทีและชำระอัตโนมัติหลังจาก stream เสร็จสิ้น
{
"hypereal": {
"insurance": {
"status": "paid",
"trigger": "latency",
"reason": "latency_threshold_exceeded",
"latency_ms": 94320,
"threshold_ms": 90000,
"credits_charged": 12,
"credits_compensated": 3
}
}
}X-Hypereal-Insurance-Status: paid X-Hypereal-Insurance-Trigger: latency X-Hypereal-Insurance-Latency-Ms: 94320 X-Hypereal-Insurance-Threshold-Ms: 90000 X-Hypereal-Insurance-Credits: 3
ใช้ managed path สำหรับ OpenAI-compatible chat completions: /v1/managed/chat/completions, Responses API: /v1/managed/responses และ OpenAI image generations: /v1/managed/images/generations ใช้ /v1/managed/messages สำหรับ Anthropic-native requests โดยตรง Claude Code ควรใช้ https://api.hypereal.cloud เป็น base URL
