মূল content-এ যান

OpenAPI 3.1

গ্রাহক API তথ্যসূত্র

এই পৃষ্ঠায় সমর্থিত গ্রাহক inference request ও response বর্ণনা করা হয়েছে। Tooling-এর জন্য machine-readable OpenAPI নথি download করুন।

OpenAPI JSON download করুন

মডেল API উদাহরণ

অনুরোধের উদাহরণ দেখতে প্রকাশিত মডেল শনাক্তকারী, API প্রোটোকল ও ভাষা বেছে নিন। গ্রাহক API key বিশ্বস্ত সার্ভারে রাখুন।

প্রোটোকলের প্রয়োজনীয়তা

OpenAI-সামঞ্জস্যপূর্ণ অনুরোধে কনফিগার করা গ্রাহক API বেস URL-এ POST /chat/completions ব্যবহার করুন (ডিফল্ট https://fusionpointai.com/api/v1)। inference অ্যাক্সেসসহ গ্রাহক key দিয়ে Authorization: Bearer ব্যবহার করে অথেনটিকেট করুন। সম্পূর্ণ ডিফল্ট URL হলো https://fusionpointai.com/api/v1/chat/completions।

সমর্থিত সক্ষমতা

বর্তমান OpenAI-সামঞ্জস্যপূর্ণ chat endpoint-এ সিঙ্ক্রোনাস টেক্সট বার্তা চলে। এই endpoint-এ streaming ও tool call সমর্থিত নয়।

ক্লায়েন্ট ইনস্টল করুন

Python ও Node.js ক্লায়েন্ট আলাদা প্যাকেজ হিসেবে ইনস্টল করুন:

Python: pip install openai anthropic

Node.js: npm install openai @anthropic-ai/sdk

cURL
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 key নিরাপদে সেট আপ করুন

inference অ্যাক্সেসসহ গ্রাহক API key তৈরি করুন এবং secret manager বা environment ব্যবহার করে সার্ভার প্রক্রিয়ায় দিন।

  1. সার্ভার environment-এ FUSIONPOINTAI_API_KEY সেট করুন; ব্রাউজার কোডে key বসাবেন না বা source control-এ commit করবেন না।
  2. HTTPS ব্যবহার করুন এবং অ্যাপ্লিকেশনের প্রয়োজনীয় অ্যাকাউন্ট ও inference অনুমতিতে key সীমাবদ্ধ রাখুন।
  3. লগ, trace ও সহায়তার অনুরোধ থেকে Authorization এবং x-api-key হেডার আড়াল করুন; key প্রকাশিত হয়ে থাকতে পারে মনে হলে বাতিল করুন।
Bash
export FUSIONPOINTAI_API_KEY="YOUR_CUSTOMER_API_KEY"

সঠিক মডেল শনাক্তকারী বেছে নিন

model ফিল্ডটি রাউটিং মান, প্রদর্শনের নাম নয়। লাইভ মডেল ক্যাটালগে প্রকাশিত শনাক্তকারী বেছে নিন।

  1. inference-এর জন্য উপলভ্য হিসেবে চিহ্নিত সক্রিয় বা legacy মডেল বেছে নিন।
  2. বিরামচিহ্ন ও সংস্করণ-প্রত্যয়সহ শনাক্তকারী হুবহু কপি করুন; মডেলের নাম থেকে ID বানাবেন না।
  3. কোনো শনাক্তকারী প্রকাশিত না থাকলে অনুমান করে মান বসানোর বদলে ক্যাটালগে প্রকাশ হওয়া পর্যন্ত অপেক্ষা করুন।
Python
model_id = "gpt-6.1-sol"
# Use this exact identifier with either protocol.

system ও একাধিক ধাপের বার্তা পাঠান

কথোপকথনের পালাগুলো মূল ক্রমে রাখুন এবং নির্বাচিত প্রোটোকল ও মডেলের সমর্থিত role ও content কাঠামোই ব্যবহার করুন।

  1. OpenAI-সামঞ্জস্যপূর্ণ অনুরোধে system, user ও assistant বার্তাগুলো ক্রমানুসারে string-content entry হিসেবে পাঠান।
  2. Claude Messages-এ প্রোটোকল-নির্দিষ্ট field-এ সমর্থিত system নির্দেশনা ও user/assistant পালাগুলো ক্রমানুসারে দিন।
  3. অ্যাপ্লিকেশনের প্রয়োজনীয় কথোপকথনের প্রসঙ্গটুকুই রাখুন এবং নির্বাচিত মডেলের প্রসঙ্গসীমা মেনে চলুন।
Python
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 অনুযায়ী প্রতিক্রিয়া যাচাই করুন।

  1. বেছে নেওয়া প্রোটোকল ও upstream মডেল যে structured-output নিয়ন্ত্রণ সমর্থন করে তা ব্যবহার করুন।
  2. তৈরি JSON-কে অবিশ্বস্ত ইনপুট হিসেবে ধরুন: parse করুন, আবশ্যক field ও type যাচাই করুন এবং অবৈধ আউটপুট সামলান।
  3. মডেলের ডকুমেন্টেশনে সমর্থনের কথা না থাকলে মডেল-প্রোটোকলের সমন্বয় JSON mode সমর্থন করে ধরে নেবেন না।
Python
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 প্রতিক্রিয়া stream নয়।

  1. বর্তমান OpenAI-সামঞ্জস্যপূর্ণ chat সিঙ্ক্রোনাস টেক্সট ফেরত দেয়, streaming নয়।
  2. নির্বাচিত upstream মডেল সমর্থন করলে Claude Messages-এ stream mode ব্যবহার করুন; proxy native server-sent event পাঠায়।
  3. ইভেন্ট ধাপে ধাপে নিন, সম্পন্ন বা ত্রুটি হলে সঠিকভাবে থামুন এবং আংশিক আউটপুটকে সম্পূর্ণ উত্তর ভাববেন না।
Python
# 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)

টুল, content block ও ত্রুটি সামলান

প্রোটোকল-নির্দিষ্ট কাঠামো অক্ষুণ্ণ রাখুন এবং tool call, মাল্টিমোডাল content ও ব্যর্থতার ক্ষেত্রে অ্যাপ্লিকেশনের আচরণ স্পষ্টভাবে নির্ধারণ করুন।

  1. বর্তমান OpenAI-সামঞ্জস্যপূর্ণ chat-এ tool call বা টেক্সটবহির্ভূত content block—কোনোটিই সমর্থিত নয়।
  2. নির্বাচিত upstream মডেল সমর্থন করলে Claude native content block ও tool-use/result data অক্ষুণ্ণ রাখে; চালানোর আগে tool-এর নাম ও argument যাচাই করুন।
  3. HTTP status ও response body দেখুন, অথেনটিকেশন, অনুমতি, যাচাই ও rate-limit ব্যর্থতা আলাদা করুন এবং সাময়িক ত্রুটিতে বিরতি বাড়িয়ে আবার চেষ্টা করুন।
Python
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-এর জন্য প্রকাশিত হুবহু শনাক্তকারী ব্যবহার করুন। প্রদর্শিত নাম রাউটিং মান নয়; অপ্রকাশিত শনাক্তকারী অনুমান করবেন না।

গ্রাহক key কোন environment variable-এ রাখব?

দুই প্রোটোকলেই FUSIONPOINTAI_API_KEY ব্যবহার করুন। এর মান বিশ্বস্ত সার্ভার environment-এ রাখুন; ক্লায়েন্ট-সাইড কোড বা লগে নয়।

OpenAI client-এ কোন URL ব্যবহার করব?

কনফিগার করা গ্রাহক API বেস URL ব্যবহার করুন; ডিফল্ট https://fusionpointai.com/api/v1। chat-completions endpoint-এ শেষে /chat/completions যোগ হয়।

Claude SDK-এর বেস URL cURL থেকে আলাদা কেন?

Anthropic SDK শেষে /v1/messages যোগ করে, তাই এর বেস URL https://fusionpointai.com/api দিন। সরাসরি HTTP অনুরোধে সম্পূর্ণ /api/v1/messages URL ব্যবহার করুন।

OpenAI-সামঞ্জস্যপূর্ণ chat কি streaming বা tool সমর্থন করে?

না। বর্তমান endpoint শুধু সিঙ্ক্রোনাস টেক্সট বার্তা সমর্থন করে; সেখানে streaming ও tool call নেই।

সব Claude মডেল কি block, tool বা streaming সমর্থন করবে?

না। নির্বাচিত upstream মডেল সমর্থন করলে এই native সুবিধাগুলো অক্ষুণ্ণ থাকে। ওই মডেলের সক্ষমতা যাচাই করুন এবং অসমর্থিত অনুরোধ সামলান।

Claude Messages · POST /messages

Claude Messages অনুরোধে POST /api/v1/messages ব্যবহার করুন। x-api-key-তে গ্রাহক key পাঠান এবং anthropic-version-এর মান 2023-06-01 দিন। Anthropic SDK-এর বেস URL https://fusionpointai.com/api, কারণ SDK শেষে /v1/messages যোগ করে; bearer অথেনটিকেশনও সমর্থিত।

নির্বাচিত upstream মডেল সমর্থন করলে Claude Messages proxy-তে native content block, tool data এবং প্রকৃত server-sent event streaming অক্ষুণ্ণ থাকে।

Fieldধরনআবশ্যকসীমাবদ্ধতা
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 না []
Claude Messages · উদাহরণ
{
    "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 দিয়ে দ্রুত শুরু

সামঞ্জস্যপূর্ণ Python বা Node.js client-এ production base URL ব্যবহার করুন, অথবা cURL দিয়ে একই JSON request পাঠান।

API-এর মূল URL: https://fusionpointai.com/api/v1

Customer API key Authorization: Bearer header-এ পাঠান। Key-তে ai:inference scope এবং service-এ account access থাকতে হবে। Key বিশ্বস্ত server-এ রাখুন।

Shell
# 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
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
}'
Python
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)
Node.js
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 · Request field

Model value হলো inference-এর জন্য বর্তমানে প্রকাশিত হুবহু নিবন্ধিত identifier। কিছু প্রকাশিত না থাকলে request পাঠানোর আগে provider catalogue দেখুন।

Fieldধরনআবশ্যকসীমাবদ্ধতা
modelstringনাসর্বোচ্চ 160 অক্ষর; হুবহু প্রকাশিত identifier ব্যবহার করুন।
messagesarrayনা1 থেকে 100টি message, ক্রমানুসারে পাঠাতে হবে।
messages[].rolestringনাsystem, user অথবা assistant।
messages[].contentstringনাপ্রতি message-এ সর্বোচ্চ 100,000 অক্ষর।
temperaturenumberনা0 থেকে 2।
max_tokensintegerনা1 থেকে 100,000; মডেলের সীমা আরও কম হতে পারে।

সফল response

সফল JSON response-এ id, object (chat.completion), created, model ও choices থাকে। একটি choice-এ index, assistant message ও finish_reason থাকে। Token usage-ও ফেরত আসতে পারে।

উদাহরণ · JSON
{
    "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
    }
}
Fieldধরনঅর্থ
idstringস্বতন্ত্র completion identifier।
objectstringResponse-এর ধরন: chat.completion।
createdintegerUnix timestamp হিসেবে তৈরির সময়।
modelstringCompletion তৈরিতে ব্যবহৃত model identifier।
choicesarrayAssistant message ও finish reason-সহ completion বিকল্প।
usageobjectফেরত এলে token-এর সংখ্যা।

Rate limit ও error

Live customer subscription-এ request বা token ব্যবহার কোনো quota-র বিপরীতে মাপা হয় না; sandbox key-তে প্রকাশিত মাসিক বরাদ্দ প্রযোজ্য। Model context window, output limit ও সাময়িক traffic control-ও কার্যকর। Chat Completions-এ synchronous text চলে; Claude Messages সমর্থিত native content block, tool ও SSE অক্ষুণ্ণ রাখে। Request পাঠানোর আগে সংশ্লিষ্ট operation schema দেখুন।

Chat operation-এ validation ও provider failure error object-এ ফেরে। Authentication ও scope middleware-এর প্রতিক্রিয়ায় ওপরের স্তরের message field থাকতে পারে; কোন স্তর request প্রত্যাখ্যান করেছে তার ওপর status ও envelope নির্ভর করে।

HTTP অবস্থাঅর্থ
200Completion সফলভাবে তৈরি হয়েছে।
400Request body বা parameter সঠিক নয়।
401Bearer API key নেই বা সঠিক নয়।
403প্রয়োজনীয় key scope বা account access নেই।
429Application throttle বা সাময়িক upstream traffic control; বিরতি বাড়িয়ে আবার চেষ্টা করুন।
500Service ব্যবহারযোগ্য completion ফেরাতে পারেনি।
OpenAPI JSON download করুন
{
    "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"
                        }
                    }
                }
            }
        }
    }
}