OpenAPI 3.1
د پېرودونکي API مرجع
دا پاڼه د پېرودونکي د اټکل ملاتړ شوې غوښتنه او ځواب تشریح کوي. د توکو لپاره د ماشینلوستلو وړ OpenAPI سند ښکته کړئ.
د OpenAPI JSON ښکته کړئد ماډل API بېلګې
د غوښتنې د بېلګې د لیدلو لپاره د ماډل خپور شوی پېژند، د API پروتوکول او ژبه وټاکئ. د پېرودونکي API کیلي پر باوري سرور کې وساتئ.
د پروتوکول اړتیاوې
د OpenAI-compatible غوښتنې په تنظیم شوي د پېرودونکي API base URL کې POST /chat/completions کاروي (تلواله: https://fusionpointai.com/api/v1). د اټکل لاسرسي لرونکې د پېرودونکي کیلي په کارولو، د Authorization: Bearer له لارې تایید وکړئ. بشپړ تلواله URL یې https://fusionpointai.com/api/v1/chat/completions دی.
د Claude Messages غوښتنې POST /api/v1/messages کاروي. د پېرودونکي کیلي په x-api-key کې ولېږئ او anthropic-version یې 2023-06-01 وټاکئ. د Anthropic SDK base URL https://fusionpointai.com/api دی، ځکه SDK ورسره /v1/messages نښلوي؛ د Bearer تایید هم ملاتړ کېږي.
ملاتړ شوې وړتیاوې
د OpenAI-compatible اوسنی chat پایټکی هممهاله متني پیغامونه سمبالوي. دا پایټکی streaming او د توکو غوښتنې نه ملاتړ کوي.
د Claude Messages proxy اصلي content blockونه او د توکو معلومات ساتي، او کله چې ټاکل شوی پورتهلاسی ماډل یې ملاتړ وکړي، د server-sent event رښتینی streaming هم برابروي.
مراجع نصب کړئ
د 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 کیلي جوړه کړئ او د پټو رازونو د مدیر یا چاپېریالي متغیر له لارې یې د سرور پروسې ته ورکړئ.
- د سرور په چاپېریال کې
FUSIONPOINTAI_API_KEYوټاکئ؛ کیلي د براوزر په کوډ کې مه ځایوئ او د سرچینې کنټرول ته یې مه سپارئ. - HTTPS وکاروئ او کیلي د حساب او د اټکل د اړینو اجازو تر کچې محدوده کړئ.
- د Authorization او
x-api-keyheaderونه له logونو، traceونو او د ملاتړ غوښتنو څخه پټ کړئ؛ که د کیلي د افشا کېدو احتمال وي، لغوه یې کړئ.
export FUSIONPOINTAI_API_KEY="YOUR_CUSTOMER_API_KEY"
د ماډل دقیق پېژند وټاکئ
د ماډل برخه د مسیر ټاکلو ارزښت دی، نه د ښودلو نوم. هغه پېژند وټاکئ چې په ژوندۍ ماډل کټلاګ کې خپور شوی وي.
- فعال یا زوړ هغه ماډل وټاکئ چې د اټکل لپاره د شتون نښه ولري.
- پېژند یې په دقیق ډول، له ټولو نښو او د نسخې وروستاړو سره، کاپي کړئ؛ له ماډل نومه پېژند هېڅکله مه اټکل کوئ.
- که پېژند نه وي خپور شوی، د کټلاګ تر خپرولو یې انتظار وباسئ او پر ځای یې اټکلي ارزښت مه کاروئ.
model_id = "gpt-6.1-sol"
# Use this exact identifier with either protocol.
سیسټمي او څوپړاوه پیغامونه ولېږئ
د خبرو وارونه په اصلي ترتیب وساتئ او یوازې هغه رولونه او د منځپانګې بڼې وکاروئ چې ټاکلی پروتوکول او ماډل یې ملاتړ کوي.
- د OpenAI-compatible غوښتنو لپاره، system، user او assistant پیغامونه د ترتیب شوو متني منځپانګو په توګه ولېږئ.
- د Claude Messages لپاره، ملاتړ شوې system لارښوونه او د 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 ځوابونه وغواړئ
کله چې اپلېکېشن جوړښتي پایلې غواړي، تر کارولو مخکې ځواب د خپلې سکېما له مخې تایید کړئ.
- د ټاکل شوي پروتوکول او پورتهلاسي ماډل له خوا ملاتړ شوي د جوړښتي پایلې کنټرولونه وکاروئ.
- جوړ شوی JSON د باور وړ نه ګڼل کېږي: تجزیه یې کړئ، اړینې برخې او ډولونه یې تایید کړئ او ناسمې پایلې سمبالې کړئ.
- ګومان مه کوئ چې د ماډل او پروتوکول هر ترکیب د 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 چلند پر ټاکلي پروتوکول او پورتهلاسي ماډل پورې اړه لري؛ عادي JSON ځواب streaming نه دی.
- اوس مهال د OpenAI-compatible chat ځواب هممهاله متن دی او streaming نه وړاندې کوي.
- د Claude Messages لپاره، که ټاکل شوی پورتهلاسی ماډل یې ملاتړ کوي، stream حالت وکاروئ؛ proxy اصلي 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-compatible chat نه د توکو غوښتنې ملاتړ کوي او نه غیرمتني د منځپانګې بلاکونه.
- Claude اصلي د منځپانګې بلاکونه او د توکو د کارونې/پایلې معلومات ساتي، که ټاکل شوی پورتهلاسی ماډل یې ملاتړ کوي؛ تر اجرا مخکې د توکو نومونه او پارامترونه تایید کړئ.
- د 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))
ډېرې پوښتل شوې پوښتنې
ایا د غوښتنې په ماډل برخه کې د ښودلو نوم کارولای شم؟
یوازې د اټکل لپاره خپور شوی دقیق پېژند وکاروئ. د ښودلو نوم د مسیر ټاکلو ارزښت نه دی؛ خپور شوی نهوي پېژند باید هېڅکله اټکل نه شي.
د پېرودونکي کیلي کوم چاپېریالي متغیر کې ساتل کېږي؟
د دواړو پروتوکولونو لپاره FUSIONPOINTAI_API_KEY وکاروئ. ارزښت یې د سرور په باوري چاپېریال کې وساتئ او د مراجعاړخیز کوډ او logونو څخه یې لرې کړئ.
د OpenAI مراجع کوم URL وکاروي؟
د پېرودونکي تنظیم شوی API base URL وکاروئ؛ تلواله یې https://fusionpointai.com/api/v1 ده. د chat-completions پایټکی ورسره /chat/completions نښلوي.
ولې د Claude SDK base URL له cURL سره توپیر لري؟
Anthropic SDK ورسره /v1/messages نښلوي، نو base URL یې https://fusionpointai.com/api وټاکئ. مستقیمه HTTP غوښتنه بشپړ /api/v1/messages URL کاروي.
ایا OpenAI-compatible chat streaming یا توکي ملاتړ کوي؟
نه. اوسنی پایټکی یوازې هممهاله متني پیغامونه ملاتړ کوي؛ streaming او د توکو غوښتنې پکې نشته.
ایا د Claude ټولو ماډلونو کې د بلاکونو، توکو یا streaming ملاتړ تضمین دی؟
نه. دا اصلي ځانګړنې یوازې هغه وخت ساتل کېږي چې ټاکل شوی پورتهلاسی ماډل یې ملاتړ وکړي. د هغه ماډل وړتیاوې وګورئ او د نهملاتړ شوو غوښتنو لپاره مناسب چلند وټاکئ.
Claude Messages · POST /messages
د Claude Messages غوښتنې POST /api/v1/messages کاروي. د پېرودونکي کیلي په x-api-key کې ولېږئ او anthropic-version یې 2023-06-01 وټاکئ. د Anthropic SDK base URL https://fusionpointai.com/api دی، ځکه SDK ورسره /v1/messages نښلوي؛ د Bearer تایید هم ملاتړ کېږي.
د Claude Messages proxy اصلي content blockونه او د توکو معلومات ساتي، او کله چې ټاکل شوی پورتهلاسی ماډل یې ملاتړ وکړي، د server-sent event رښتینی streaming هم برابروي.
| برخه | ډول | اړین | محدودیتونه |
|---|---|---|---|
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 چټک پیل
له تولیدي base URL سره سازګار Python یا Node.js مراجع وکاروئ، یا په cURL کې همدا JSON غوښتنه ولېږئ.
د API اصلي URL: https://fusionpointai.com/api/v1
د پېرودونکي API کیلي د Authorization: Bearer header کې واستوئ. کیلي باید د 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 · د غوښتنې برخې
د ماډل ارزښتونه هغه دقیق ثبت شوي پېژندونه دي چې اوس د اټکل لپاره خپاره شوي. که څه نه وي خپاره شوي، د غوښتنې تر لېږلو مخکې د چمتوکوونکي کټلاګ وګورئ.
| برخه | ډول | اړین | محدودیتونه |
|---|---|---|---|
model | string | نه | تر ۱۶۰ تورو پورې؛ دقیق خپور شوی پېژند وکاروئ. |
messages | array | نه | له ۱ تر ۱۰۰ پیغامونو پورې، په ترتیب لېږل کېږي. |
messages[].role | string | نه | system، user یا assistant. |
messages[].content | string | نه | د هر پیغام تر ۱۰۰٬۰۰۰ تورو پورې. |
temperature | number | نه | له ۰ تر ۲ پورې. |
max_tokens | integer | نه | له ۱ تر ۱۰۰٬۰۰۰ پورې؛ ماډل ښايي ټیټ حد ولري. |
بریالی ځواب
بریالی JSON ځواب id، object (chat.completion)، created، model او choices لري. یو choice index، د assistant پیغام او finish_reason لري. د token کارونه هم راتلای شي.
{
"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 timestamp په بڼه. |
model | string | د بشپړونې لپاره کارول شوی د ماډل پېژند. |
choices | array | د assistant پیغام او د پای دلیل لرونکي د بشپړونې انتخابونه. |
usage | object | که بېرته راولېږل شي، د token شمېر. |
د غوښتنو حد او تېروتنې
د پېرودونکو ژوندۍ ګډونونه د غوښتنو یا token کارونه د کوټې له مخې نه شمېرې؛ د sandbox کیلي د خپرې شوې میاشتنۍ ونډې له مخې وي. د ماډل د متن کړکۍ، د پایلې حدونه او د ترافیک لنډمهاله کنټرولونه بیا هم پلي کېږي. Chat Completions هممهاله متن دی؛ Claude Messages ملاتړ شوي اصلي content blockونه، توکي او SSE ساتي. د غوښتنو تر لېږلو مخکې د عملیاتو جلا سکېماوې وګورئ.
د chat عملیات د تایید او د چمتوکوونکي ناکامۍ په error object کې راولي. د تایید او ساحې منځګړي ښايي پر ځای یې په root کې message field ورکړي؛ حالت او بڼه د رد کوونکې طبقې له مخې وي.
| HTTP حالت | مانا |
|---|---|
200 | بشپړونه په بریالیتوب جوړه شوه. |
400 | د غوښتنې متن یا پارامتر ناسم دی. |
401 | Bearer API کیلي ورکه یا ناسمه ده. |
403 | اړینه د کیلي ساحه یا د حساب لاسرسی نشته. |
429 | د اپلېکېشن throttle یا د پورتهلاسي لنډمهاله ترافیک کنټرول؛ د واټن په زیاتولو بیا هڅه وکړئ. |
500 | خدمت د کار وړ بشپړونه بېرته ورنه کړای شوه. |
د OpenAPI JSON ښکته کړئ
{
"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"
}
}
}
}
}
}
}