OpenAPI 3.1
سەرچاوەی APIی کڕیار
ئەم لاپەڕەیە داواکاری و وەڵامی inferenceی پشتگیریکراوی کڕیار ڕوون دەکاتەوە. بۆ ئامرازەکان، بەڵگەنامەی OpenAPIی خوێندنەوەی ماشینی دابەزێنە.
دابەزاندنی JSONی OpenAPIنموونەکانی APIی مۆدێل
ناسێنەری مۆدێلی بڵاوکراوە، پرۆتۆکۆلی API و زمان هەڵبژێرە بۆ بینینی نموونەی داواکاری. کلیلی APIی کڕیار لە ڕاژەخزمەتێکی متمانەپێکراودا بهێڵەوە.
پێداویستییەکانی پرۆتۆکۆل
داواکارییە گونجاوەکانی OpenAI، POST /chat/completions لە URLی بنەمای APIی کڕیار بەکاردەهێنن کە ڕێکخراوە (بنەڕەت: https://fusionpointai.com/api/v1). بە Authorization: Bearer پشتڕاست بکەرەوە و کلیلی کڕیارێک بە دەستگەیشتنی inference بەکاربهێنە. URLی بنەڕەتیی تەواو https://fusionpointai.com/api/v1/chat/completionsە.
داواکارییەکانی Claude Messages، POST /api/v1/messages بەکاردەهێنن. کلیلی کڕیار لە x-api-key بنێرە و anthropic-version بکە بە 2023-06-01. URLی بنەمای Anthropic SDK https://fusionpointai.com/apiیە چونکە SDK، /v1/messages زیاد دەکات؛ پشتڕاستکردنەوەی Bearerیش پشتگیری دەکرێت.
توانا پشتگیریکراوەکان
خاڵی کۆتاییی چاتی گونجاو لەگەڵ OpenAI نامەی دەقیی هاوکات مامەڵەی لەگەڵ دەکات. ئەم خاڵە کۆتاییە پشتگیریی streaming و بانگکردنی ئامراز ناکات.
پرۆکسیی Claude Messages، بلۆکی ناوەڕۆکی سروشتی، داتای ئامراز و streamingی ڕاستەقینەی server-sent event دەپارێزێت ئەگەر مۆدێلی upstreamی هەڵبژێردراو پشتگیرییان بکات.
دامەزراندنی کڕیار
کڕیارەکانی Python و Node.js وەک پاکێجی جیاواز دابمەزرێنە:
Python: pip install openai anthropic
Node.js: npm install openai @anthropic-ai/sdk
curl 'https://fusionpointai.com/api/v1/chat/completions' \
-H "Authorization: Bearer $FUSIONPOINTAI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "gpt-6.1-sol",
"messages": [
{
"role": "user",
"content": "Summarize this in one sentence."
}
],
"temperature": 0.7,
"max_tokens": 300
}'
شێوازی داواکاری
ڕێکخستنی پارێزراوی کلیلی API
کلیلی APIی کڕیارێک بە دەستگەیشتنی inference دروست بکە و لە ڕێگەی بەڕێوەبەری نهێنی یان ژینگەوە بیدە بە پرۆسەیەکی ڕاژەخزمەت.
FUSIONPOINTAI_API_KEYلە ژینگەی ڕاژەخزمەت دابنێ؛ کلیلی لە کۆدی وێبگەڕدا دانەنێ یان لە کۆنترۆڵی وەشان تۆماری مەکە.- HTTPS بەکاربهێنە و کلیلەکە بە هەژمار و مۆڵەتی inferenceی پێویستی بەرنامەکە سنووردار بکە.
- سەردێڕەکانی authorization و
x-api-keyلە تۆمار، trace و داواکاریی پشتگیری لاببە؛ ئەگەر لەوانەیە کلیل ئاشکرا بووبێت، ڕەتی بکەرەوە.
export FUSIONPOINTAI_API_KEY="YOUR_CUSTOMER_API_KEY"
هەڵبژاردنی ناسێنەری وردی مۆدێل
خانەی مۆدێل بەهای ڕەوانەکردنە، نەک ناوی پیشاندان. ناسێنەرێک هەڵبژێرە کە لە کەتەلۆگی زیندووی مۆدێل بڵاوکراوەتەوە.
- مۆدێلێکی چالاک یان کۆن هەڵبژێرە کە بۆ inference بەردەست نیشانکراوە.
- ناسێنەرەکە بە وردی لەگەڵ خاڵبەندی و پاشگری وەشانەکان لەبەر بگرە؛ هەرگیز ناسێنەرێک لە ناوی مۆدێل دروست مەکە.
- ئەگەر ناسێنەرێک بڵاو نەکراوەتەوە، چاوەڕێی کەتەلۆگ بکە تا دابینی بکات؛ بەهای خەمڵێنراو جێگرەوە مەکە.
model_id = "gpt-6.1-sol"
# Use this exact identifier with either protocol.
ناردنی نامەی سیستەم و نامەی چەندجارە
ڕیزبەندیی قۆناغەکانی گفتوگۆ وەک خۆی بهێڵەوە و تەنها ئەو ڕۆڵ و شێوەی ناوەڕۆکە بەکاربهێنە کە پرۆتۆکۆل و مۆدێلی هەڵبژێردراو پشتگیری دەکەن.
- بۆ داواکاریی گونجاو لەگەڵ OpenAI، نامەی system، user و assistant وەک خانەی ناوەڕۆکی دەقیی ڕیزبەندکراو بنێرە.
- بۆ Claude Messages، ڕێنماییی سیستەمی پشتگیریکراو و قۆناغە ڕیزبەندکراوەکانی user/assistant لە خانە سروشتییەکانی پرۆتۆکۆلدا بنێرە.
- تەنها ئەو کۆنتێکستی گفتوگۆ بهێڵەوە کە بەرنامەکەت پێویستی پێیەتی و سنووری کۆنتێکستی مۆدێلی هەڵبژێردراو پەیڕەو بکە.
response = client.messages.create(
model="gpt-6.1-sol",
max_tokens=512,
system="Answer in clear, concise German.",
messages=[
{"role": "user", "content": "What is an API?"},
{"role": "assistant", "content": "An API lets software exchange requests and responses."},
{"role": "user", "content": "Give a practical example."},
],
)
for block in response.content:
if block.type == "text":
print(block.text)
داوای وەڵامی JSON
کاتێک بەرنامە دەرئەنجامی ڕێکخراوی دەوێت، پێش بەکارهێنانی وەڵامەکە بە schemaی خۆی هەڵیبسەنگێنە.
- کۆنترۆڵی دەرخستنی ڕێکخراوی پشتگیریکراو لەلایەن پرۆتۆکۆل و مۆدێلی upstreamی هەڵبژێردراو بەکاربهێنە.
- JSONی دروستکراو وەک تێخستنی متمانەپێنەکراو مامەڵەی لەگەڵ بکە: parseی بکە، خانە و جۆرە پێویستەکان پشتڕاست بکەوە و بۆ دەرخستنی نادروست ئامادەبە.
- گریمانە مەکە تێکەڵەیەکی مۆدێل و پرۆتۆکۆل دۆخی JSON پشتگیری دەکات، مەگەر بەڵگەنامەی مۆدێل بیڵێت.
import json
# JSON is generated content, not trusted application input.
response = client.messages.create(
model="gpt-6.1-sol", max_tokens=256,
messages=[{"role": "user", "content": 'Return only JSON with a string field named "summary". Explain an API in one sentence.'}],
)
text = "".join(block.text for block in response.content if block.type == "text")
try:
result = json.loads(text)
if not isinstance(result, dict) or not isinstance(result.get("summary"), str):
raise ValueError("Unexpected response schema")
print(result["summary"])
except (json.JSONDecodeError, ValueError) as error:
print("Handle invalid model output:", error)
وەرگرتنی دەرخستنی SSEی ڕاستەوخۆ
ڕەفتاری streaming بە پرۆتۆکۆل و مۆدێلی upstreamی هەڵبژێردراوەوە بەستراوە؛ وەڵامی ئاساییی JSON streaming نییە.
- چاتی گونجاو لەگەڵ OpenAI لە ئێستادا دەقی هاوکات دەگەڕێنێتەوە و streaming پێشکەش ناکات.
- بۆ Claude Messages، ئەگەر مۆدێلی upstream پشتگیریی بکات دۆخی stream بەکاربهێنە؛ پرۆکسییەکە server-sent eventی سروشتی دەنێرێتەوە.
- ڕووداوەکان هەنگاو بە هەنگاو وەربگرە، لە کۆتایی یان هەڵە بە پاکی بوەستە و دەرخستنی بەشەکی بە وەڵامی تەواو مەزانە.
# client is the Anthropic client configured above.
with client.messages.stream(
model="gpt-6.1-sol", max_tokens=512,
messages=[{"role": "user", "content": "Explain API authentication."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
final_message = stream.get_final_message()
print("\nStop reason:", final_message.stop_reason)
مامەڵە لەگەڵ ئامراز، بلۆکی ناوەڕۆک و هەڵەکان
پێکهاتە سروشتییەکانی پرۆتۆکۆل بپارێزە و ڕەفتاری بەرنامە لە بەرامبەر بانگکردنی ئامراز، ناوەڕۆکی چەندڕەنگ و شکستهکاندا بە ڕوونی دیاری بکە.
- چاتی گونجاو لەگەڵ OpenAI لە ئێستادا نە بانگکردنی ئامراز پشتگیری دەکات و نە بلۆکی ناوەڕۆکی نادەقی.
- Claude بلۆکی ناوەڕۆکی سروشتی و داتای بەکارهێنان/ئەنجامی ئامراز دەپارێزێت ئەگەر مۆدێلی upstream پشتگیریی بکات؛ پێش جێبەجێکردن ناوی ئامراز و ئارگومێنتەکان پشتڕاست بکەرەوە.
- دۆخی HTTP و ناوەڕۆکی وەڵام بپشکنە، شکستەکانی پشتڕاستکردنەوە، مۆڵەت، پشتڕاستکردنەوەی خانە و سنووری ڕێژە لە یەک جیا بکەرەوە و بۆ هەڵەی کاتی دووبارە هەوڵ بدەرەوە بە دواخستنی زیادبوو.
import json
from datetime import datetime, timezone
from anthropic import APIError
messages = [{"role": "user", "content": "What time is it in UTC?"}]
tools = [{
"name": "current_utc_time", "description": "Read the current UTC time.",
"input_schema": {"type": "object", "properties": {}, "additionalProperties": False},
}]
try:
reply = client.messages.create(model="gpt-6.1-sol", max_tokens=256, messages=messages, tools=tools)
results = []
for block in reply.content:
if block.type == "tool_use":
if block.name != "current_utc_time" or block.input != {}:
raise ValueError("Unapproved tool request")
results.append({"type": "tool_result", "tool_use_id": block.id,
"content": json.dumps({"utc": datetime.now(timezone.utc).isoformat()})})
if results:
messages.append({"role": "assistant", "content": reply.content})
messages.append({"role": "user", "content": results})
reply = client.messages.create(model="gpt-6.1-sol", max_tokens=256, messages=messages, tools=tools)
print("".join(block.text for block in reply.content if block.type == "text"))
except APIError as error:
# Log status only; never log keys or private prompts.
print("API request failed:", getattr(error, "status_code", None))
پرسیارە باوەکان
دەتوانم ناوی پیشاندانی مۆدێل لە داواکاری بەکاربهێنم؟
تەنها ناسێنەری وردی بڵاوکراوە بۆ inference بەکاربهێنە. ناوی پیشاندان بەهای ڕەوانەکردن نییە و ناسێنەری بڵاونەکراوە هەرگیز نابێت خەمڵێنرێت.
کلیلی کڕیار لە کام ژینگەگۆڕاوەدا هەڵدەگیرێت؟
بۆ هەردوو پرۆتۆکۆل FUSIONPOINTAI_API_KEY بەکاربهێنە. بەهای کلیل لە ژینگەی ڕاژەخزمەتی متمانەپێکراودا بهێڵەوە و لە کۆدی لای کڕیار و تۆمار دووری بخەرەوە.
کڕیاری OpenAI کام URL بەکاربهێنێت؟
URLی بنەمای APIی کڕیاری ڕێکخراو بەکاربهێنە کە بنەڕەتەکەی https://fusionpointai.com/api/v1ە. خاڵی کۆتاییی chat-completions، /chat/completionsی پێوە زیاد دەکات.
بۆچی URLی بنەمای Claude SDK لە cURL جیاوازە؟
Anthropic SDK، /v1/messages زیاد دەکات، بۆیە URLی بنەماکەی بکە بە https://fusionpointai.com/api. داواکاریی HTTPی ڕاستەوخۆ URLی تەواوی /api/v1/messages بەکاردەهێنێت.
ئایا چاتی گونجاو لەگەڵ OpenAI streaming یان ئامراز پشتگیری دەکات؟
نەخێر. خاڵی کۆتاییی ئێستا تەنها نامەی دەقیی هاوکات پشتگیری دەکات؛ streaming و بانگکردنی ئامراز لەوێدا بەردەست نین.
ئایا گەرەنتی دەکرێت هەموو مۆدێلەکانی Claude بلۆک، ئامراز یان streaming پشتگیری بکەن؟
نەخێر. ئەم تایبەتمەندییانەی سروشتی تەنها ئەگەر مۆدێلی upstreamی هەڵبژێردراو پشتگیری بکات دەپارێزرێن. توانای مۆدێلەکە بپشکنە و داواکاریی پشتگیرینەکراو بەڕێوەببە.
Claude Messages · POST /messages
داواکارییەکانی Claude Messages، POST /api/v1/messages بەکاردەهێنن. کلیلی کڕیار لە x-api-key بنێرە و anthropic-version بکە بە 2023-06-01. URLی بنەمای Anthropic SDK https://fusionpointai.com/apiیە چونکە SDK، /v1/messages زیاد دەکات؛ پشتڕاستکردنەوەی Bearerیش پشتگیری دەکرێت.
پرۆکسیی Claude Messages، بلۆکی ناوەڕۆکی سروشتی، داتای ئامراز و streamingی ڕاستەقینەی server-sent event دەپارێزێت ئەگەر مۆدێلی upstreamی هەڵبژێردراو پشتگیرییان بکات.
| خانە | جۆر | پێویستە | سنوورەکان |
|---|---|---|---|
model |
string |
بەڵێ | {"minLength":1,"maxLength":160} |
max_tokens |
integer |
بەڵێ | {"minimum":1,"maximum":100000} |
messages |
array |
بەڵێ | {"minItems":1,"maxItems":100,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string","maxLength":80}},"additionalProperties":true}}]}}}} |
system |
string | array |
نەخێر | {"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","required":["type","text"],"properties":{"type":{"const":"text"},"text":{"type":"string"}},"additionalProperties":true}}]} |
stream |
boolean |
نەخێر | {"default":false} |
temperature |
number |
نەخێر | {"minimum":0,"maximum":1} |
top_p |
number |
نەخێر | {"minimum":0,"maximum":1} |
top_k |
integer |
نەخێر | {"minimum":0,"maximum":100000} |
stop_sequences |
array |
نەخێر | {"items":{"type":"string"}} |
tools |
array |
نەخێر | {"items":{"type":"object","additionalProperties":true}} |
tool_choice |
object |
نەخێر | {"additionalProperties":true} |
thinking |
object |
نەخێر | {"additionalProperties":true} |
metadata |
object |
نەخێر | {"additionalProperties":true} |
output_config |
object |
نەخێر | {"additionalProperties":true} |
service_tier |
string |
نەخێر | [] |
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"model": "gpt-6.1-sol",
"content": [
{
"type": "text",
"text": "A concise answer to the supplied question."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 12,
"output_tokens": 10
}
}
{"type":"error","error":{"type":"authentication_error","message":"Invalid or missing API key."}}
دەستپێکردنی خێرای SDK
URLی بنەڕەتیی بەرهەمهێنان لەگەڵ کڕیاری Python یان Node.jsی گونجاو بەکاربهێنە، یان هەمان داواکاریی JSON بە cURL بنێرە.
URLی بنەڕەتیی API: https://fusionpointai.com/api/v1
کلیلی APIی کڕیار لە هێدەری Authorization: Bearer بنێرە. کلیلەکە دەبێت مەودای ai:inference و دەستگەیشتنی هەژمار بۆ خزمەتگوزارییەکەی هەبێت. کلیلەکە لە سێرڤەرێکی متمانەپێکراودا بهێڵەوە.
# Install the client for your application language.
# Python:
python -m pip install openai
# Node.js:
npm install openai
# Bash: enter the key without storing it in shell history.
read -rs -p 'FusionPointAI API key: ' FUSIONPOINTAI_API_KEY
export FUSIONPOINTAI_API_KEY
printf '\n'
# After finishing:
# unset FUSIONPOINTAI_API_KEY
curl 'https://fusionpointai.com/api/v1/chat/completions' \
-H "Authorization: Bearer $FUSIONPOINTAI_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "claude-opus-5-5",
"messages": [
{
"role": "user",
"content": "Summarize this in one sentence."
}
],
"temperature": 0.7,
"max_tokens": 300
}'
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FUSIONPOINTAI_API_KEY"],
base_url="https://fusionpointai.com/api/v1",
)
response = client.chat.completions.create(
model="claude-opus-5-5",
messages=[{"role": "user", "content": "Summarize this in one sentence."}],
temperature=0.7,
max_tokens=300,
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.FUSIONPOINTAI_API_KEY,
baseURL: "https://fusionpointai.com/api/v1",
});
const response = await client.chat.completions.create({
model: "claude-opus-5-5",
messages: [{ role: "user", content: "Summarize this in one sentence." }],
temperature: 0.7,
max_tokens: 300,
});
console.log(response.choices[0].message.content);
OpenAI · خانەکانی داواکاری
بەهای مۆدێل، ناسنامە تۆمارکراوە وردەکانی ئێستای بڵاوکراوە بۆ inferenceن. ئەگەر هیچ ناسنامەیەک بڵاونەکراوەتەوە، پێش ناردنی داواکاری کاتەلۆگی دابینکەر بپشکنە.
| خانە | جۆر | پێویستە | سنوورەکان |
|---|---|---|---|
model | string | بەڵێ | زۆرترین 160 پیت؛ ناسنامەی بڵاوکراوەی ورد بەکاربهێنە. |
messages | array | بەڵێ | 1 تا 100 پەیام، بە ڕیز دەنێردرێن. |
messages[].role | string | بەڵێ | system، user یان assistant. |
messages[].content | string | بەڵێ | زۆرترین 100,000 پیت بۆ هەر پەیامێک. |
temperature | number | نەخێر | لە 0 تا 2. |
max_tokens | integer | نەخێر | لە 1 تا 100,000؛ ڕەنگە مۆدێل سنوورێکی کەمتر دابنێت. |
وەڵامی سەرکەوتوو
وەڵامی JSONی سەرکەوتوو id، object (chat.completion)، created، model و choices دەگرێتەوە. choiceێک index، پەیامی assistant و finish_reason لەخۆدەگرێت. ڕەنگە بەکارهێنانی تۆکنیش بگەڕێندرێتەوە.
{
"id": "chatcmpl_example",
"object": "chat.completion",
"created": 1700000000,
"model": "claude-opus-5-5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A concise summary of the supplied text."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 10,
"total_tokens": 22
}
}
| خانە | جۆر | واتا |
|---|---|---|
id | string | ناسنامەی تاکی تەواوکردن. |
object | string | جۆری وەڵام: chat.completion. |
created | integer | کاتی دروستکردن وەک مۆرەکاتی Unix. |
model | string | ناسنامەی مۆدێلی بەکارهاتوو بۆ تەواوکردن. |
choices | array | هەڵبژاردەکانی تەواوکردن لەگەڵ پەیامی assistant و هۆکاری کۆتایی. |
usage | object | ژمارەی تۆکنەکان، ئەگەر بگەڕێندرێتەوە. |
سنووری ڕێژە و هەڵەکان
بەشداریکردنی کڕیاری چالاک داواکاری یان بەکارهێنانی تۆکن بەرامبەر کوۆتا ناپێوێت؛ کلیلی sandbox ڕێگەپێدانی مانگانەی بڵاوکراوەی خۆی بەکاردەهێنێت. پەنجەرەی کۆنتێکستی مۆدێل، سنووری دەرچوون و کۆنترۆڵی کاتیی هاتوچۆ هەروا کاریگەرن. Chat Completions دەقی هاوکاتە؛ Claude Messages بلۆکی ناوەڕۆکی سروشتی، ئامراز و SSEی پشتگیریکراو دەپارێزێت. پێش ناردنی داواکاری، سکیماکانی کرداری جیاواز بپشکنە.
کرداری chat شکستی پشتڕاستکردنەوە و دابینکەر لە ئۆبجێکتی هەڵەدا دەگەڕێنێتەوە. Middlewareی پشتڕاستکردنەوە و مەودا لەوانەیە لەبری ئەوە خانەی messageی سەرەکی بگەڕێنێتەوە؛ دۆخ و قاپ بە لایەنی ڕەتکردنەوەکەوە دەبەسترێتەوە.
| دۆخی HTTP | واتا |
|---|---|
200 | تەواوکردن بە سەرکەوتوویی دروست کرا. |
400 | جەستە یان پارامەتەری داواکاری نادروستە. |
401 | کلیلی APIی bearer نییە یان نادروستە. |
403 | مەودای پێویستی کلیل یان دەستگەیشتنی هەژمار نییە. |
429 | throttleی بەرنامە یان کۆنترۆڵی کاتیی هاتوچۆی دابینکەری سەرەوە؛ بە دواخستن دووبارە هەوڵ بدەرەوە. |
500 | خزمەتگوزارییەکە نەیتوانی تەواوکردنێکی بەکارهێنراو بگەڕێنێتەوە. |
دابەزاندنی JSONی OpenAPI
{
"openapi": "3.1.0",
"info": {
"title": "FusionPointAI Customer API",
"version": "1.0.0",
"description": "OpenAI-compatible synchronous text Chat Completions and native Claude Messages. Use https://fusionpointai.com/api/v1 as the production HTTP base URL. Claude SDKs use the base without /v1 because they append /v1/messages. Model capabilities, subscription permissions and technical limits still apply. Native streaming and content blocks belong to the Messages operation, not Chat Completions."
},
"servers": [
{
"url": "https://fusionpointai.com/api/v1",
"description": "FusionPointAI Production API"
}
],
"security": [
{
"bearerAuth": []
}
],
"tags": [
{
"name": "Inference",
"description": "Synchronous JSON chat completion"
}
],
"x-rateLimitPolicy": {
"type": "unmetered_subscription",
"summary": "Live subscriptions do not meter request or token usage against a quota; sandbox keys use their published monthly allowance.",
"technical_constraints": "Model context windows, maximum output sizes, and temporary traffic controls may still apply according to the selected model or upstream provider."
},
"x-errorReference": [
{
"status": 200,
"description": "The completion was created successfully."
},
{
"status": 400,
"description": "The request body or one of its parameters is invalid."
},
{
"status": 401,
"description": "The bearer API key is missing or invalid."
},
{
"status": 403,
"description": "The key lacks the required inference scope or account access."
},
{
"status": 429,
"description": "The request was limited by application throttling or an upstream provider."
},
{
"status": 500,
"description": "The service could not complete the request."
}
],
"paths": {
"/chat/completions": {
"post": {
"tags": [
"Inference"
],
"summary": "Create a chat completion",
"operationId": "createChatCompletion",
"description": "Create a synchronous JSON completion. Messages support system, user, and assistant roles with string content. Use the separate Messages operation for native Claude content blocks and SSE.",
"security": [
{
"bearerAuth": []
}
],
"x-codeSamples": [
{
"lang": "cURL",
"label": "cURL",
"source": "curl 'https://fusionpointai.com/api/v1/chat/completions' \\\n -H \"Authorization: Bearer $FUSIONPOINTAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"claude-opus-5-5\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Summarize this in one sentence.\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 300\n}'"
},
{
"lang": "Python",
"label": "Python",
"source": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n api_key=os.environ[\"FUSIONPOINTAI_API_KEY\"],\n base_url=\"https://fusionpointai.com/api/v1\",\n)\n\nresponse = client.chat.completions.create(\n model=\"claude-opus-5-5\",\n messages=[{\"role\": \"user\", \"content\": \"Summarize this in one sentence.\"}],\n temperature=0.7,\n max_tokens=300,\n)\nprint(response.choices[0].message.content)"
},
{
"lang": "Node.js",
"label": "Node.js",
"source": "import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n apiKey: process.env.FUSIONPOINTAI_API_KEY,\n baseURL: \"https://fusionpointai.com/api/v1\",\n});\n\nconst response = await client.chat.completions.create({\n model: \"claude-opus-5-5\",\n messages: [{ role: \"user\", content: \"Summarize this in one sentence.\" }],\n temperature: 0.7,\n max_tokens: 300,\n});\nconsole.log(response.choices[0].message.content);"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionRequest"
}
}
}
},
"responses": {
"200": {
"description": "Completion created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorised"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"429": {
"$ref": "#/components/responses/RateLimited"
},
"500": {
"$ref": "#/components/responses/ServerError"
}
}
}
},
"/messages": {
"post": {
"tags": [
"Inference"
],
"summary": "Create a Claude Messages response",
"operationId": "createMessage",
"description": "Native Messages format. The model must support the requested content blocks, tools and streaming options. The gateway forwards provider-native JSON or real SSE without translating it into Chat Completions. A configured native upstream is required. Maximum JSON request size: 12 MiB.",
"security": [
{
"claudeApiKey": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"in": "header",
"name": "anthropic-version",
"schema": {
"type": "string",
"maxLength": 64
},
"example": "2023-06-01"
},
{
"in": "header",
"name": "anthropic-beta",
"schema": {
"type": "string",
"maxLength": 512
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"label": "cURL",
"source": "curl 'https://fusionpointai.com/api/v1/messages' \\\n -H \"x-api-key: $FUSIONPOINTAI_API_KEY\" \\\n -H \"anthropic-version: 2023-06-01\" \\\n -H \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"claude-opus-5-5\",\n \"max_tokens\": 300,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Summarize this in one sentence.\"\n }\n ]\n}'"
},
{
"lang": "Python",
"label": "Python",
"source": "import os\nfrom anthropic import Anthropic\n\nclient = Anthropic(\n api_key=os.environ[\"FUSIONPOINTAI_API_KEY\"],\n base_url=\"https://fusionpointai.com/api\",\n)\n\nresponse = client.messages.create(\n model=\"claude-opus-5-5\",\n max_tokens=300,\n messages=[{\"role\": \"user\", \"content\": \"Summarize this in one sentence.\"}],\n)\nprint(response.content)"
},
{
"lang": "Node.js",
"label": "Node.js",
"source": "import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n apiKey: process.env.FUSIONPOINTAI_API_KEY,\n baseURL: \"https://fusionpointai.com/api\",\n});\n\nconst response = await client.messages.create({\n model: \"claude-opus-5-5\",\n max_tokens: 300,\n messages: [{ role: \"user\", content: \"Summarize this in one sentence.\" }],\n});\nconsole.log(response.content);"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeMessagesRequest"
}
}
}
},
"responses": {
"200": {
"description": "Native message or incremental native SSE events.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeMessage"
}
},
"text/event-stream": {
"schema": {
"type": "string",
"description": "message_start, content_block_start/delta/stop, message_delta/stop and provider error events as delivered upstream."
}
}
}
},
"201": {
"description": "Invalid JSON, message structure, field type or bounds.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"202": {
"description": "Missing, invalid, conflicting or query-string credentials.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"203": {
"description": "Scope, account or training-reference permission denied.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"204": {
"description": "Request exceeds 12 MiB.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"205": {
"description": "Application or upstream rate limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"206": {
"description": "Inference provider or service failure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"207": {
"description": "Inference provider or service failure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"208": {
"description": "Native upstream or server credentials are not configured.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
},
"209": {
"description": "Upstream overloaded.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClaudeError"
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "API key"
},
"claudeApiKey": {
"type": "apiKey",
"in": "header",
"name": "x-api-key"
}
},
"schemas": {
"ChatCompletionRequest": {
"type": "object",
"required": [
"model",
"messages"
],
"properties": {
"model": {
"type": "string",
"maxLength": 160,
"enum": [
"claude-opus-5-5",
"claude-sonnet-5-5",
"claude-haiku-5-5",
"command-a-plus-05-2026",
"command-a-reasoning-08-2025",
"command-a-vision-07-2025",
"command-a-translate-08-2025",
"embed-v5.0-pro",
"embed-v5.0-fast",
"rerank-v5.0-pro",
"rerank-v5.0-fast",
"deepseek-flash",
"glm-5.3-flashx",
"kimi-k3.1-pro",
"kimi-k3.1-pro-highspeed",
"gpt-6.1-sol",
"gpt-6.1-terra",
"gpt-6-luna",
"qwen3.8-max",
"qwen3.8-flash",
"qwen3.8-omni-flash",
"qwen3.7-plus"
],
"description": "An exact registered model identifier currently published for inference."
},
"messages": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"$ref": "#/components/schemas/ChatMessage"
}
},
"temperature": {
"type": "number",
"minimum": 0,
"maximum": 2
},
"max_tokens": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"description": "The selected model may impose a lower output limit."
}
}
},
"ChatMessage": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
]
},
"content": {
"type": "string",
"maxLength": 100000
}
}
},
"ChatCompletionResponse": {
"type": "object",
"required": [
"id",
"object",
"model",
"choices"
],
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string",
"example": "chat.completion"
},
"created": {
"type": "integer"
},
"model": {
"type": "string"
},
"choices": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatChoice"
}
},
"usage": {
"$ref": "#/components/schemas/TokenUsage"
}
}
},
"ChatChoice": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"message": {
"$ref": "#/components/schemas/ChatMessage"
},
"finish_reason": {
"type": [
"string",
"null"
]
}
}
},
"TokenUsage": {
"type": "object",
"properties": {
"prompt_tokens": {
"type": "integer"
},
"completion_tokens": {
"type": "integer"
},
"total_tokens": {
"type": "integer"
}
}
},
"Error": {
"oneOf": [
{
"$ref": "#/components/schemas/OperationError"
},
{
"$ref": "#/components/schemas/MiddlewareError"
}
]
},
"OperationError": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message",
"type",
"code"
],
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"code": {
"type": [
"string",
"integer",
"null"
]
},
"details": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"MiddlewareError": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string"
}
},
"additionalProperties": true
},
"ClaudeMessagesRequest": {
"type": "object",
"required": [
"model",
"max_tokens",
"messages"
],
"properties": {
"model": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"enum": [
"claude-opus-5-5",
"claude-sonnet-5-5",
"claude-haiku-5-5",
"command-a-plus-05-2026",
"command-a-reasoning-08-2025",
"command-a-vision-07-2025",
"command-a-translate-08-2025",
"embed-v5.0-pro",
"embed-v5.0-fast",
"rerank-v5.0-pro",
"rerank-v5.0-fast",
"deepseek-flash",
"glm-5.3-flashx",
"kimi-k3.1-pro",
"kimi-k3.1-pro-highspeed",
"gpt-6.1-sol",
"gpt-6.1-terra",
"gpt-6-luna",
"qwen3.8-max",
"qwen3.8-flash",
"qwen3.8-omni-flash",
"qwen3.7-plus"
]
},
"max_tokens": {
"type": "integer",
"minimum": 1,
"maximum": 100000
},
"messages": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant"
]
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"maxLength": 80
}
},
"additionalProperties": true
}
}
]
}
}
}
},
"system": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"type": {
"const": "text"
},
"text": {
"type": "string"
}
},
"additionalProperties": true
}
}
]
},
"stream": {
"type": "boolean",
"default": false
},
"temperature": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"top_p": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"top_k": {
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"stop_sequences": {
"type": "array",
"items": {
"type": "string"
}
},
"tools": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"tool_choice": {
"type": "object",
"additionalProperties": true
},
"thinking": {
"type": "object",
"additionalProperties": true
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"output_config": {
"type": "object",
"additionalProperties": true
},
"service_tier": {
"type": "string"
}
},
"additionalProperties": true
},
"ClaudeMessage": {
"type": "object",
"required": [
"type",
"content"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"const": "message"
},
"role": {
"const": "assistant"
},
"content": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"maxLength": 80
}
},
"additionalProperties": true
}
},
"model": {
"type": "string"
},
"stop_reason": {
"type": [
"string",
"null"
]
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
},
"ClaudeError": {
"type": "object",
"required": [
"type",
"error"
],
"properties": {
"type": {
"const": "error"
},
"error": {
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
},
"responses": {
"BadRequest": {
"description": "Invalid request body or parameter.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"Unauthorised": {
"description": "Missing or invalid bearer API key.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"Forbidden": {
"description": "The key lacks the required inference scope or account access.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"RateLimited": {
"description": "Application throttle or temporary upstream traffic control.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"ServerError": {
"description": "The service could not return a usable completion.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}