सामग्री पर चल जाईं
निम्बोट पर वापस जाओ

ज्ञान के आधार बा डेवलपर्स

चैट, प्रतिक्रियाएं और संदेश

उदाहरण के लिए, एक मॉडल से कुछ पूछने के तीन तरीके हैं, तीन प्रारूपों में क्लाइंट पहले से ही बोलते हैं, सभी एक ही मॉडल पर चलते हैं और एक ही तरह से बिल करते हैं।

चैट कॉम्प्लीशन्स

ओपनएआई चैट प्रारूप, और लगभग हर उपकरण समर्थन करता है। अब तक वार्तालाप भेजें और अगला संदेश वापस प्राप्त करें।

POST https://nymbot.ai/api/v1/chat/completions — के API key के जरूरत बा।

खाली model औरी messages आरएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइएआरइए supported_parametersजेहे चीज़ मॉडल कवनो हाल में ना कर सके, ओकरा के छोड़ल ना, बलुक मना कइल जाला: जवन मॉडल देख ना सके ओकरा खातिर तस्वीर, अउरी जवन मॉडल टूल्स के चला ना सके ओकरा खातिर टूल्स।

खेतप्रकारजरूरी बाविवरण
modelडोरीहॅंंnymbot/auto (अथवा auto) मानक शेष राशि पर निम्बॉट के रूटिंग के लिए, या एक कैटलॉग मॉडल आईडी जैसे anthropic/claude-sonnet-5 Pro बैलेंस पर। ऐप के छोट नाम अउरी उपनाम भी स्वीकार कइल जाला। 'a' पर खतम हो सकेला। प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो प्रत्ययो.
messagesवरि सरणीहॅंंकथोपकथन। भूमिकाएँ system, developer (सिस्टम के रूप में मानल जाव), user, assistant औरी tool........................................................................................................................................................................................................ text औरी image_url भाग; चित्र केवल उपयोगकर्ता संदेशों में। input_audio अउर फाइल के हिस्सा मना कर दिहल गइल बा।
streamबुलियनना.जिवें लिखा गया है, वैसे ही जवाब भेजो। स्ट्रीमिंग.
stream_optionsवस्तुना.{"include_usage": true} आर. ए. आर. टोकन गणनाओं और लागत के साथ एक अंतिम हिस्सा जोड़ता है।
max_tokens
max_completion_tokens
पूर्णांकना.लिखे खातिर सबसे जादे टोकन। अगर ई मॉडल के अधिकतम से जादे बा, त ओकरा के कम क दिहल जाई। ई ईहो तय करेला कि राउर बैलेंस से कतनो राशिस रोकल जाई, एहसे कम नंबर के मतलब बा कि शुरू करे खातिर कम क्रेडिट के जरूरत पड़ी।
temperature
top_p
आर. ए. आर. नंबरना.सैंपलिंग कंट्रोल: temperature 0 निफ्राय 2, top_p 0 से 1 तक।
stopस्ट्रिंग या ऐरेना.उत्तर के खतम करे वाला टेक्स्ट: एगो स्ट्रिंग भा ढेर से ढेर 4 स्ट्रिंग, जेमें से हर एगो ढेर से ढेर 256 कैरेक्टर के हो सकेला। एकर प्रयोग ना होला nymbot/auto.
seedपूर्णांकना.दोहरावे लायक सैंपलिंग खातिर, जहाँ मॉडल एकरा के सपोर्ट करेला।
presence_penalty
frequency_penalty
आर. ए. आर. नंबरना.पुनरावृत्ति नियंत्रण, हर एक -2 से 2 तक।
response_formatवस्तुना.{"type": "json_object"} ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. {"type": "json_schema", "json_schema": {…}}, जहाँ मॉडल समर्थन करेला। केहू द्वारा उपयोग ना कइल जाला nymbot/auto.
tools
tool_choice
parallel_tool_calls
आरे, स्ट्रिंग या ऑब्जेक्ट, बूलियनना.फांशन कालिंग। सेरी टूल कॉल. अ web_search पी. ए. आर. टूल चालू वेब खोजअधिकतम 128 उपकरणों और 512 KB परिभाषाओं पर, अधिकतम 64 स्तरों की गहराई पर घोंसला बनाया गया है। 400.
reasoning_effort
reasoning
स्ट्रिंग, ऑब्जेक्टना."minimal", "low", "medium" ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. "high"क्षमा याचना करो, या {"effort": "high"}. "none" ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. {"enabled": false} रेइएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएएए तर्क.
pluginsवरि सरणीना.[{"id": "web", "max_results": 5}] हमेशा वेब पर पहले सर्च करें। 10 तक के परिणाम।
nपूर्णांकना.खाली 1। अउर कुछु गइला पर वापस आ जाई 400.
logit_bias
user
metadata
ऑब्जेक्ट, स्ट्रिंग, ऑब्जेक्टना.स्वीकार कइल गइल बा अउर आगे ना भेजल गइल बा। logit_bias अधिकतम 300 टोकन आईडी पर-100 से 100 तक के नंबरों को मैप करता है; user अक्षर अधिकतम 256 अक्षरों का होता है; metadata एहमे ढेर से ढेर 16 स्ट्रिंग वैल्यू, 64 कैरेक्टर तक के कीज़ अउरी 512 तक के वैल्यू समा सकेला।

rRe जवाब एक साधारण है chat.completionअरे, लागत के साथ usage.cost रे (डालरों में) और nymbot वस्तु। model r हल मॉडल आईडी है, इसलिए एक छोटा नाम पूर्ण के रूप में वापस आता है। यदि मॉडल उत्तर देने से पहले तर्क करता है, तो इसका तर्क है message.reasoning_contentउत्तर, उत्तर से अलग।

rRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

{
  "id": "chatcmpl-5f1c0a9e27d84b3c",
  "object": "chat.completion",
  "created": 1790726400,
  "model": "anthropic/claude-sonnet-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "A Lightning invoice is a one-time payment request..."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 1240,
    "completion_tokens": 380,
    "total_tokens": 1620,
    "prompt_tokens_details": { "cached_tokens": 0 },
    "completion_tokens_details": { "reasoning_tokens": 0 },
    "cost": 0.01895
  },
  "nymbot": {
    "balance": "pro",
    "charged_credits": 0.162,
    "charged_sats": 16.2,
    "balance_credits": 412.425,
    "balance_sats": 41242.5
  }
}

finish_reason क्या वापस आया है उससे काम किया जाता है, क्योंकि प्रदाता इसे अलग तरह से रिपोर्ट करते हैंः tool_calls जब मॉडल टूल्स माँगे लागल, length जब जवाब देवे खातिर सभ टोकन के इस्तेमाल हो गइल (या मॉडल ओकरा सभ के सोच-विचार में खटवा देलस अउरी कवनो जवाब ना लिखल), content_filter जब प्रदाता ने मना कर दिया, और stop ना तऽ। usage.completion_tokens_details.reasoning_tokens हमेशा 0: छिपे हुए तर्क टोकन गिने जाते हैं, और चार्ज किए जाते हैं। completion_tokens.

स्थितिमाब्ला?
400ना. model ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. messages (missing_required_parameter); एक ऑडियो या फाइल भाग, या एक मॉडल के लिए चित्र जो उन्हें देख नहीं सकते (unsupported_contentr); 20 से अधिक चित्र (too_many_images); सैंपलिंग पैरामीटर गलत टाइप के बा भा सीमा से बाहर बा (invalid_value); एक तस्वीर लिंक जो सार्वजनिक नहीं है (invalid_image_urlr); एक मॉडल पर उपकरण जो उन्हें कॉल नहीं कर सकते (unsupported_tool); n 1 के अलावा; a :thinking ऐसे मॉडल पर प्रत्यय जो तर्क नहीं कर सकता (model_not_found); अथवा प्रदाता ने अनुरोध को अस्वीकार कर दिया (upstream_rejected).
402मॉडल द्वारा खर्च की जाने वाली शेष राशि होल्ड को कवर नहीं कर सकती है।
403सबसे खराब स्थिति चाबी की कैप में फिट नहीं बैठती है (key_limit_reachedr). निचला max_tokens हँ सीमा बढ़ा दऽ।
404उस नाम का कोई मॉडल नहीं (model_not_found).
429चाबी की दर सीमा, या प्रदाता की (upstream_rate_limited).
502, 503प्रदाता असफल (upstream_errorρ) अथवा अतिभारित (upstream_overloadedखैर, के साथ Retry-After). जब तक प्रदाता ने प्रयास के लिए बिल नहीं लिया है तब तक कुछ भी शुल्क नहीं लिया जाता है।

स्टेटस कोड प्रत्येक एंडप्वाइन्ट शेयर नीचे सूचीबद्ध हैं। गलतीआं घटाओ.

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "messages": [
      {"role": "system", "content": "Answer in one short paragraph."},
      {"role": "user", "content": "What is a Lightning invoice?"}
    ],
    "max_tokens": 400
  }'

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[
        {"role": "system", "content": "Answer in one short paragraph."},
        {"role": "user", "content": "What is a Lightning invoice?"},
    ],
    max_tokens=400,
)
print(reply.choices[0].message.content)
print(reply.usage.cost)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const reply = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-5",
  messages: [
    { role: "system", content: "Answer in one short paragraph." },
    { role: "user", content: "What is a Lightning invoice?" },
  ],
  max_tokens: 400,
});
console.log(reply.choices[0].message.content);
console.log(reply.usage.cost);

रिम स्ट्रीमिंग

के साथ "stream": true रिप्लाई जवाब सर्वर-सेंड इवेंट्स के रूप में आता है जबकि मॉडल इसे लिखता है। प्रत्येक इवेंट एक है chat.completion.chunk ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. data: रेखा, और धारा के साथ समाप्त होता है data: [DONE]रीअर. रीजनिंग अंदर आती है delta.reasoning_contentअतएवं, जवाब delta.content.

कवनो अइसन चीज के स्ट्रीम करीं जेमें लगभग 100 सेकंड से बेसी लाग सकेला, जइसे कि कौनों लंबा जवाब, कवनो बड़ऽ max_tokens हवा चाहे कवनो तर्क मॉडल होखे। एगो अइसन अनुरोध जे स्ट्रीम ना होला, उ जवाब पूरा होखला तक कुछुओ ना भेजी, अउर रउआ अउर Nymbot के बीच के नेटवर्क लगभग 100 सेकंड के बाद खाली कनेक्शन के बंद कर सकेला; मॉडल फिर भी काम पूरा करी अउर जवन ऊ लिखलस ओकर शुल्क लागी, बाकिर जवाब खो जाई। एगो स्ट्रीम 'keep-alives' भेजीले, एहसे जबले मॉडल लिखत रहे, उ खुलल रही।

धारा प्रवाह

data: {"id":"chatcmpl-5f1c0a9e27d84b3c","object":"chat.completion.chunk","created":1790726400,"model":"anthropic/claude-sonnet-5","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}

data: {"id":"chatcmpl-5f1c0a9e27d84b3c","object":"chat.completion.chunk","created":1790726400,"model":"anthropic/claude-sonnet-5","choices":[{"index":0,"delta":{"content":"A Lightning invoice"},"finish_reason":null}]}

: keep-alive

data: {"id":"chatcmpl-5f1c0a9e27d84b3c","object":"chat.completion.chunk","created":1790726400,"model":"anthropic/claude-sonnet-5","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: {"id":"chatcmpl-5f1c0a9e27d84b3c","object":"chat.completion.chunk","created":1790726400,"model":"anthropic/claude-sonnet-5","choices":[],"usage":{"prompt_tokens":1240,"completion_tokens":380,"total_tokens":1620,"cost":0.01895},"nymbot":{"balance":"pro","charged_credits":0.162,"charged_sats":16.2,"balance_credits":412.425,"balance_sats":41242.5}}

data: [DONE]
  • एह लाइन के शुरुआत होखेला : उदाहरण के तौर पर कीप-अलाइव कमेंट्स, हर 15 सेकंड में भेजे जाते हैं जब मॉडल सोच रहा होता है। एस. एस. ई. क्लाइंट उन्हें छोड़ देते हैं।
  • माँगS "stream_options": {"include_usage": true} ऊपर वाला आखिरी टुकड़ा पावे खातिर, खाली एगो choices, टोकन के गिनती, लागत आउर nymbot वस्तु।
  • स्ट्रीम खतम होखे के बाद चार्ज सेटल हो जाला। अगर रउआ कनेक्शन के जल्दी बंद कर देबेनी, त मॉडल के रुकल ना जाला: Nymbot अपने टोकन के गिनती लेवे खातिर, 25 सेकंड तक, प्रोवाइडर के बाकी के स्ट्रीम के पढ़ला, अउर जे एह तरह से प्रोवाइडर रिपोर्ट करी, रउआ ओही के भुगतान करब। ओह गिनती के बिना, चार्ज रउआ इनपुट अउर जे लिखल गइल बा, ओकरा के जोड़ के, अउर एगो रीजनिंग करे वाला मॉडल खातिर पूरा आउटपुट अलाउंस से अनुमानित कइल जाला।
  • पहिलChunk से पहिले कवनो गलती, जइसे कि 401 ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. 402, अपना स्टेटस कोड के साथ साधारण JSON के रूप में आवेला, स्ट्रीम के रूप में नाहीं। स्ट्रीम शुरू होवे के बाद एगो एरर आखिरी में आवेला। data: {"error": {…}} एस. ए. आर. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. [DONE].
  • OpenAI के Responses transport पर टूल के साथ वाला रिक्वेस्ट अउरी मॉडल, प्रोवाइडर से स्ट्रीम ना होखले। उ लोग अभी भी एगो वैध स्ट्रीम के साथ जवाब देवेला, जे जवाब पूरा होखला के बाद भेजल जाला।

cURL

curl -N https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nymbot/auto",
    "stream": true,
    "stream_options": {"include_usage": true},
    "messages": [{"role": "user", "content": "Write a haiku about sats."}]
  }'

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

stream = client.chat.completions.create(
    model="nymbot/auto",
    stream=True,
    stream_options={"include_usage": True},
    messages=[{"role": "user", "content": "Write a haiku about sats."}],
)
for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="", flush=True)
    elif chunk.usage:
        print("\ncost:", chunk.usage.cost)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const stream = await client.chat.completions.create({
  model: "nymbot/auto",
  stream: true,
  stream_options: { include_usage: true },
  messages: [{ role: "user", content: "Write a haiku about sats." }],
});
for await (const chunk of stream) {
  if (chunk.choices.length) process.stdout.write(chunk.choices[0].delta.content || "");
  else if (chunk.usage) console.log("\ncost:", chunk.usage.cost);
}

टूल कॉल्स

फंक्शन के बारे में बतावा जाव tools r. a. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. nr. n tool ओही के साथ संदेश tool_call_id, अउर बातचीत के फेर से भेजीं। Nymbot राउर फंक्शन कबहूँ ना चलावेला; एहसे उ मॉडल के अनुरोध के राउर पास वापस भेज देला।

tool_choice लेवेला "auto", "none", "required" ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. {"type": "function", "function": {"name": "…"}}मॉडल के सूची उ मॉडल के चिन्ह करेले जे टूल के इस्तेमाल कर सकेला (capabilities.tools). टूल रिजेक्ट कइल जा रहल बा 400 unsupported_tool चालू nymbot/auto अउर ऊ कुछcatalog मॉडल जे OpenAI के Responses transport पर चलेला, जेकरा में Nymbot टूल ना भेज सकेला।

के साथ "stream": trueउदाहरण के लिए, उपकरणों के साथ एक अनुरोध एक टुकड़े में चलता है और फिर एक सामान्य चंक अनुक्रम के रूप में भेजा जाता हैः भूमिका, प्रत्येक टूल कॉल को उसके सूचकांक, आईडी, नाम और तर्क के साथ ले जाने वाला एक हिस्सा, और फिनिश चंक। स्ट्रीम किए गए टूल कॉल को पढ़ने वाले ग्राहक इसे हमेशा की तरह संभालते हैं।

आंशिक रूप से आर. ई. आर. प्रतिक्रिया

"choices": [
  {
    "index": 0,
    "message": {
      "role": "assistant",
      "content": null,
      "tool_calls": [
        {
          "id": "call_7d2e",
          "type": "function",
          "function": { "name": "get_invoice_status", "arguments": "{\"invoice_id\":\"a41f\"}" }
        }
      ]
    },
    "finish_reason": "tool_calls"
  }
]

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "messages": [{"role": "user", "content": "Has invoice a41f been paid?"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_invoice_status",
        "description": "Look up whether an invoice is paid.",
        "parameters": {
          "type": "object",
          "properties": {"invoice_id": {"type": "string"}},
          "required": ["invoice_id"]
        }
      }
    }]
  }'

Python

import json, os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

tools = [{
    "type": "function",
    "function": {
        "name": "get_invoice_status",
        "description": "Look up whether an invoice is paid.",
        "parameters": {
            "type": "object",
            "properties": {"invoice_id": {"type": "string"}},
            "required": ["invoice_id"],
        },
    },
}]
messages = [{"role": "user", "content": "Has invoice a41f been paid?"}]

reply = client.chat.completions.create(model="anthropic/claude-sonnet-5", messages=messages, tools=tools)
call = reply.choices[0].message.tool_calls[0]
args = json.loads(call.function.arguments)

messages.append(reply.choices[0].message)
messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps({"paid": True})})

final = client.chat.completions.create(model="anthropic/claude-sonnet-5", messages=messages, tools=tools)
print(final.choices[0].message.content)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const tools = [{
  type: "function",
  function: {
    name: "get_invoice_status",
    description: "Look up whether an invoice is paid.",
    parameters: {
      type: "object",
      properties: { invoice_id: { type: "string" } },
      required: ["invoice_id"],
    },
  },
}];
const messages = [{ role: "user", content: "Has invoice a41f been paid?" }];

const reply = await client.chat.completions.create({ model: "anthropic/claude-sonnet-5", messages, tools });
const call = reply.choices[0].message.tool_calls[0];
const args = JSON.parse(call.function.arguments);

messages.push(reply.choices[0].message);
messages.push({ role: "tool", tool_call_id: call.id, content: JSON.stringify({ paid: true }) });

const final = await client.chat.completions.create({ model: "anthropic/claude-sonnet-5", messages, tools });
console.log(final.choices[0].message.content);

आर. ए. आर. पिक्चर्स इन अ रिक्वायरमेन्ट

आर. ए. आई. माडल्स capabilities.vision RFi चित्र पढ़ सकते हैं। एक जोड़ें image_url एगो यूजर के मैसेज के हिस्सा, जेमे चाहे त सार्वजनिक हो सकेला https:// ए. आर. ऐ. लिङ्क् या ए data:image/…;base64, यू. आर. एल...................................................................................................................................................................................................400 invalid_image_url). एगो ऐच्छिक detail खैर है auto, low ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. high.

के साथ nymbot/auto, एगो फोटो वाला रिक्वेस्ट एगो मानक मॉडल के पास भेजल जाला जे देख सकेला। बिना कवनो कैटलॉग मॉडल capabilities.vision तस्वीरवा के मना कर देता बाड़न 400 unsupported_contentचित्र केवल उपयोगकर्ता संदेशों में हो सकते हैं। एक लिंक एक सार्वजनिक होस्ट को इंगित करना चाहिए; निम्बॉट चित्र को मॉडल के प्रदाता को भेजता है और इसे नहीं रखता है।

जेसन बाकी रिक्वेस्ट के नियर, एगो फोटो के भी इनपुट टोकन के रूप में गिनेला आ ओकर शुल्क लेल जाला।

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this picture?"},
        {"type": "image_url", "image_url": {"url": "https://example.com/receipt.jpg"}}
      ]
    }]
  }'

Python

import base64, os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

with open("receipt.jpg", "rb") as f:
    data_url = "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What is in this picture?"},
            {"type": "image_url", "image_url": {"url": data_url}},
        ],
    }],
)
print(reply.choices[0].message.content)

JavaScript

import { readFile } from "node:fs/promises";
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const dataUrl = "data:image/jpeg;base64," + (await readFile("receipt.jpg")).toString("base64");

const reply = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-5",
  messages: [{
    role: "user",
    content: [
      { type: "text", text: "What is in this picture?" },
      { type: "image_url", image_url: { url: dataUrl } },
    ],
  }],
});
console.log(reply.choices[0].message.content);

तर्क शक्ति

आर. ए. आई. माडल्स capabilities.reasoning जवाभ देवे से पहिले सोच सकत बाड़न। एकरा के कम चाहे जादे खातिर पूछल जाव reasoning_effort ("minimal", "low", "medium" ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. "high") वा "reasoning": {"effort": "high"}, या जोड़ीं :thinking या प्रतिमान नाम, या उच्च प्रयास का अर्थ है। बिना तर्क के एक मॉडल पर सेटिंग को नजरअंदाज कर दिया जाता है। nymbot/auto, :thinking रिक्वेस्ट के स्टैंडर्ड रीजनिंग रूट पर भेजता।

Anthropic मॉडल पर मेहनत एगो सोचल बजट बन जाला जवन लगभग 1,000, 2,000, 8,000 चाहे 16,000 टोकन होला, एकरा से बेसी कबहूँ ना max_tokens अनुमती देता है। सोच को छोड़ दिया जाता है जब tool_choice एगो टूल के मजबूर करेला, अउरी जब रिक्वेस्ट एगो टूल लूप के जारी रखले रहेला (एकर आखिरी मैसेज एगो टूल रिज़ल्ट होला), काहे कि Anthropic के ओकरा के आगे बढ़ावे खातिर पहिले वाला साइन कइल सोच (thinking) के जरूरत होला। एही बात Responses अउरी Messages एंडपॉइंट परहो लागू होला।

तर्क वापस आ रहल बा message.reasoning_contentक्षमा याचना करो, या delta.reasoning_content r स्ट्रीमिंग के दौरान, उत्तर में कभी नहीं मिलाएं। रीजनिंग आउटपुट है और अंदर के रूप में चार्ज किया जाता है। completion_tokensकुछ प्रोवाइडर रीजनिंग टेक्स्ट एकदमै ना देवेले, अउर फिरो ओकर पइसा काट लिहल जाला।

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "reasoning_effort": "high",
    "messages": [{"role": "user", "content": "Is 2^61 - 1 prime? Show why."}]
  }'

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    reasoning_effort="high",
    messages=[{"role": "user", "content": "Is 2^61 - 1 prime? Show why."}],
)
message = reply.choices[0].message
print(getattr(message, "reasoning_content", None))
print(message.content)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const reply = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-5",
  reasoning_effort: "high",
  messages: [{ role: "user", content: "Is 2^61 - 1 prime? Show why." }],
});
console.log(reply.choices[0].message.reasoning_content);
console.log(reply.choices[0].message.content);

मॉडल सफ़िक्स (Model suffixes)

मॉडल के नाम पर एगो प्रत्यय (suffix) बिना कवनो दोसर फ़ील्ड के, अनुरोध (request) के सँभालल बदल देला। ई पूरा ID अउरी छोट नाम, दुनो पर काम करेला, जइसे कि anthropic/claude-sonnet-5:online.

प्रत्ययप्रभाव
:onlineपहिले वेब पर खोजऽ, जइसे कि plugins: [{"id": "web"}]। देखऽ वेब खोज.
:thinkingउच्च तर्क प्रयास; on nymbot/auto, तर्क वाला रस्ता। अइसन मॉडल पर, जे तर्क ना कर सकेला, 400 model_not_found “no endpoints found” के साथ।
:nitro, :floor, :exacto, :extendedस्वीकृत और उपेक्षित। प्रत्येक कैटलॉग मॉडल का एक मार्ग होता है, इसलिए चुनने के लिए कोई तेज़, सस्ता या लंबा नहीं होता है; प्रत्यय की अनुमति है इसलिए अन्य सेवाओं से प्रतिलिपि किए गए मॉडल नाम अभी भी काम करते हैं।

कवनो दूसर प्रत्यय के नजरअंदाज कइल जाला। पहिले पूरा नाम के कोशिश कइल जाला, एह से अइसन मॉडल जेकर id में सचमुच कोलन (:) बा, ऊ भी काम करी; अगर ऊ ना भइल, त एक-एक करके अंत से प्रत्यय हटावल जाला जब तक कि मॉडल मिल ना जाए। एगो मॉडल के नाम ज़्यादा से ज़्यादा 200 अक्षर के हो सकेला आ ओकरा में ज़्यादा से ज़्यादा 4 प्रत्यय हो सकेला; अउरी लंबा वाला के इनकार कइल जाला... 400 invalid_value.

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5:thinking",
    "messages": [{"role": "user", "content": "Plan a three-day trip to Lisbon."}]
  }'

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5:thinking",
    messages=[{"role": "user", "content": "Plan a three-day trip to Lisbon."}],
)
print(reply.choices[0].message.content)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const reply = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-5:thinking",
  messages: [{ role: "user", content: "Plan a three-day trip to Lisbon." }],
});
console.log(reply.choices[0].message.content);

कौनो भी चैट मॉडल लाइव वेब से जवाब दे सकेला। Nymbot आखिरी यूजर मैसेज (ओकर पहिले के 2,000 अक्षर) खोजेला, सबले नीक पेज पढ़ेला अउर सवाल के साथ ओकरा के मॉडल के दे देला, जेकरा के बाहर के कंटेंट के रूप में मार्क कइल जाला ताकि मॉडल ओकरा से कौनो निर्देश न लेवे। एकरा में दू गो मोड बाड़े:

  • हमेशा खोजो: "plugins": [{"id": "web", "max_results": 5}], या अ​ा :online मॉडल पर प्रत्यय।
  • <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<: "tools": [{"type": "web_search", "parameters": {"max_results": 5}}], ... के रूप में भी मानल जाला web_search_preview ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. openrouter:web_search. Nymbot तभी खोजेला जब सवाल अइसन लागेला कि ओकरा खातिर ताज़ा जानकारी के जरूरत बा, ओही टेस्ट के, जेकर इस्तेमाल ऐप करेला।

max_results 5 डिफॉल्ट बा अउर ढेर से ढेर 10। सोत (sources) वापस आवेला nymbot.web_search.sources, हर एक के साथ एगो title, snippet औरी urlए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, url_citation संदेश पर टिप्पणी।

हर एगो सर्च जे चललेला ओकर लागत $0.008 बा, जेके sats में बदलल जाला, टोकन के अलावा, आ ई होल्ड के हिस्सा ह। जे पेज ओकरा पढ़ल बा उहो इनपुट टोकन ह, त असली वेब से जवाब पावे के लागत, बिना वेब के पूछल गइल उहे सवाल से जादे बा, कखनो-कखनो त कई गो गुना जादे।

आंशिक रूप से आर. ई. आर. प्रतिक्रिया

"nymbot": {
  "balance": "pro",
  "charged_credits": 0.431,
  "charged_sats": 43.1,
  "balance_credits": 411.994,
  "balance_sats": 41199.4,
  "web_search": {
    "sources": [
      { "title": "Lightning Network - Wikipedia", "snippet": "The Lightning Network is a payment protocol...", "url": "https://en.wikipedia.org/wiki/Lightning_Network" }
    ]
  }
}

cURL

curl https://nymbot.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "plugins": [{"id": "web", "max_results": 5}],
    "messages": [{"role": "user", "content": "What changed in the latest Bitcoin Core release?"}]
  }'

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

reply = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[{"role": "user", "content": "What changed in the latest Bitcoin Core release?"}],
    extra_body={"plugins": [{"id": "web", "max_results": 5}]},
)
print(reply.choices[0].message.content)
for source in reply.model_extra["nymbot"]["web_search"]["sources"]:
    print(source["url"])

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const reply = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-5",
  plugins: [{ id: "web", max_results: 5 }],
  messages: [{ role: "user", content: "What changed in the latest Bitcoin Core release?" }],
});
console.log(reply.choices[0].message.content);
for (const source of reply.nymbot.web_search.sources) console.log(source.url);

रिस्पॉन्स API

OpenAI के नया फॉर्मेट, जेकर इस्तेमाल OpenAI Agents SDK अउर Codex द्वारा कइल जाला। ई Chat Completions नियर ही ओही मॉडल, बिलिंग अउर फीचर पर चलेला।

POST https://nymbot.ai/api/v1/responses — के API key के जरूरत बा।

खेतप्रकारजरूरी बाविवरण
modelडोरीहॅंंजइसन कि चैट कॉम्प्लीशन्स, प्रत्यय सहित।
inputस्ट्रिंग या ऐरेहॅंंएगो स्ट्रिंग, चाहे चीजन के एगो लिस्ट: संदेश (रोल्स user, assistant, system, developer) के साथ input_text, input_image औरी output_text स्पेयर पार्ट्स, आ function_call औरी function_call_output औजार खातिर सामान। input_image लेत बा image_url लिंक चाहे डेटा URL, कवनो फ़ाइल आईडी नाहीं। reasoning औरी web_search_call पी. ए. आर. आइ. डि. आइटम्स को छोड़ दिया जाता है; item_reference आरआरआइ अस्वीकार कर दिया जाता है।
instructionsडोरीना.प्रणाली निर्देश।
max_output_tokensपूर्णांकना.लिखे खातिर सबसे जादे टोकन।
temperature
top_p
आर. ए. आर. नंबरना.सैंपलिंग कंट्रोल, जहाँ मॉडल ऊके लेवेला।
tools
tool_choice
parallel_tool_calls
आरे, स्ट्रिंग या ऑब्जेक्ट, बूलियनना.फ़ंक्शन टूल्स, रिस्पॉन्स के आकार में ({"type": "function", "name": …, "parameters": …}). A web_search ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. web_search_preview पी. ए. आर. टूल चालू वेब खोज जब ई मदद करेला। बाकी बिल्ट-इन टूल के मना कर दिहल जाला।
reasoningवस्तुना.{"effort": "minimal" | "low" | "medium" | "high"}. xhigh औरी max मतलब high; none एके बंद कर देला।
text.format
response_format
वस्तुना.संरचित आउटपुट, जे. एस. ओ. एन. योजना के रूप में या json_object.
metadataवस्तुना.जवाब में बिना बदलले वापस मिलल। ढेर से ढेर 16 स्ट्रिंग वैल्यू, 64 कैरेक्टर तक के कीज़ अउर 512 तक के वैल्यू।
streamबुलियनना.नीचे बतावल गइल तरीका से इवेंट्स के स्ट्रीम करीं।
storeबुलियनना.उपेक्षा की गई। कुछ भी संग्रहीत नहीं है, और प्रतिक्रिया हमेशा कहती है "store": false.
previous_response_id
conversation
background
स्ट्रिंग, ऑब्जेक्ट, बुलियनना.rRi समर्थित नहीं हैः 400 unsupported_parameterप्रतिक्रियाएं संग्रहीत नहीं हैं, इसलिए पूरी बातचीत को अंदर भेजें। input हर बार इनकार करो।

rRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

{
  "id": "resp_8c1e4b0f9a2d4e61",
  "object": "response",
  "created_at": 1790726400,
  "status": "completed",
  "model": "anthropic/claude-sonnet-5",
  "output": [
    {
      "type": "message",
      "id": "msg_2b7f",
      "role": "assistant",
      "status": "completed",
      "content": [{ "type": "output_text", "text": "A Lightning invoice is...", "annotations": [] }]
    }
  ],
  "output_text": "A Lightning invoice is...",
  "usage": {
    "input_tokens": 1240,
    "input_tokens_details": { "cached_tokens": 0 },
    "output_tokens": 380,
    "output_tokens_details": { "reasoning_tokens": 0 },
    "total_tokens": 1620
  },
  "incomplete_details": null,
  "error": null,
  "instructions": null,
  "store": false,
  "previous_response_id": null,
  "metadata": {},
  "nymbot": { "balance": "pro", "charged_credits": 0.162, "charged_sats": 16.2, "balance_credits": 412.425, "balance_sats": 41242.5 }
}

एक गो टूल के विनती ... में दिखाई देला output a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. function_call एस. ए. आर. आई. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. call_id, name औरी argumentsrr; a के रूप में परिणाम वापस भेजो function_call_output ऐच्छिक वस्तु उसी के साथ call_idr. तर्क, जेब्ला माडल इसे वापस करता है, एक है reasoning एस. ए. आर. आई. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. ऐ. reasoning_text सामग्री, पहले सूचीबद्ध। status खैर है incomplete a. n. r. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n. n max_output_tokens या प्रदाता मना कऽ देलस, के साथ incomplete_details.reason आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. max_output_tokens ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. content_filterप्रतिक्रिया ओपनएआई की तरह अनुरोध की सेटिंग्स (तापमान, उपकरण, उपकरण की पसंद आदि) को भी प्रतिध्वनित करती है, और इसमें अनुरोध को शामिल किया जाता है। nymbot लागत वस्तु।

स्ट्रीम कइल, हर एगो इवेंट हउवे एगो event: लइया अउर ए data: a के साथ लाइन sequence_number, एही क्रम में: response.created, response.in_progress, response.output_item.added, response.content_part.addedतथापि, दी कोई भी संख्या response.output_text.delta, response.output_text.done, response.content_part.done, response.output_item.doneअतएवं, अते अन्तिमे response.completed उपयोग और लागत के साथ। एक जवाब कट शॉर्ट का अंत रेसर के साथ होता है। response.incomplete बदले में, और धारा के साथ शुरू होने के बाद एक विफलता response.failed. रीजनिंग स्ट्रीम अपना खुद के आइटम के रूप में के साथ response.reasoning_text.delta औरी .donesr. टूल कॉल संदेश के बाद आते हैं, प्रत्येक के साथ एक आइटम के रूप में response.function_call_arguments.delta औरी .done.

स्थितिमाब्ला?
400ना. model ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. input; previous_response_id, conversation, background वा भा अगिला item_reference (unsupported_parameter); एगो ना सहारा देवे वाला औजार भा सामग्री के प्रकार।
402, 403, 404, 429, 502, 503जहाँ तक चैट कम्प्लीशन की बात है।

cURL

curl https://nymbot.ai/api/v1/responses \
  -H "Authorization: Bearer $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "instructions": "Answer in one short paragraph.",
    "input": "What is a Lightning invoice?"
  }'

Python

import os
from openai import OpenAI

client = OpenAI(base_url="https://nymbot.ai/api/v1", api_key=os.environ["NYMBOT_API_KEY"])

response = client.responses.create(
    model="anthropic/claude-sonnet-5",
    instructions="Answer in one short paragraph.",
    input="What is a Lightning invoice?",
)
print(response.output_text)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://nymbot.ai/api/v1", apiKey: process.env.NYMBOT_API_KEY });

const response = await client.responses.create({
  model: "anthropic/claude-sonnet-5",
  instructions: "Answer in one short paragraph.",
  input: "What is a Lightning invoice?",
});
console.log(response.output_text);

मानवशास्त्रीय सन्देश

एन्थ्रोपिक एसडीकेएस और क्लाउड कोड के लिए एंथ्रोपिक का प्रारूप। यह कैटलॉग में हर मॉडल के साथ काम करता है, न केवल क्लाउडः अनुरोध का अनुवाद किया जाता है, उसी पाइपलाइन के माध्यम से चलाया जाता है, और वापस अनुवाद किया जाता है।

POST https://nymbot.ai/api/v1/messages — के एगो API key चाहीं, जइसन कि x-api-key ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. Authorization: Bearer.

प्रो. anthropic-version औरी anthropic-beta हेडर स्वीकार कइल जाला आ उहो नज़रअंदाज़ कइल जाला। Anthropic मॉडल के नाम के कैटलॉग से मिलावल जाला, ताकि Claude Code आ SDKS ओही नाम से काम कर सकें जेकर उ पहिले से इस्तेमाल करत बाड़न:

  • एगो नाम जे केतLOG जानत बा, जइसे कि claude-sonnet-5 ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. anthropic/claude-opus-5, जइसन बा ओसही इस्तेमाल कइल जाला।
  • अन्यथा तारीख (-20260514), -latest, एगो वर्जन टैग जइसे कि -v1रे, एक ब्रैकेटेड टैग जिवें कि [1m] अउर एगो anthropic/ ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. anthropic. prefix हटा दिहल जाला, अउरी वर्जन में точка अउरी डैश के दुनो तरीका से कोशिश कइल जाला (claude-haiku-4-5 मिलल चीज़ claude-haiku-4.5).
  • अगर ऊ अबहियो कुछू से मेल ना खाए, त परिवार (Opus, Sonnet भा Haiku) के इस्तेमाल कइल जाई, जबले कि कैटलॉग के वर्जन ऊहे होखे भा जे पूछल गइल बा ओकरा से नया होखे।
  • <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 404 not_found_error.
खेतप्रकारजरूरी बाविवरण
modelडोरीहॅंंएगो कैटलॉग मॉडल आईडी, चाहे एगो Anthropic मॉडल के नाम।
max_tokensपूर्णांकहॅंंलिखे खातिर सबसे जादे टोकन।
messagesवरि सरणीहॅंंuser औरी assistant मुड़त, साथे text, image (base64 भावे URL स्रोत), tool_use औरी tool_result ब्लॉक। thinking सिगांनि मोड़ों से ब्लॉकों को स्वीकार किया जाता है और गिरा दिया जाता है।
systemस्ट्रिंग या ऐरेना.सिस्टम प्रॉम्प्ट, एक स्ट्रिंग या टेक्स्ट ब्लॉक के रूप में।
temperature
top_p
आर. ए. आर. नंबरना.सैंपलिंग कंट्रोल, जहाँ मॉडल ऊके लेवेला। top_k आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. ए. आर. ए. ए. आर. ए. आर. ए. ए. आर. ए. ए. आर. ए. ए. आर. ए. ए. आर. ए. ए. आर. ए. ए. आर. ए. आर. ए. आर. ए. आर. ए. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर.
stop_sequencesतारां-तारां-तारांना.जवाब के अंत में आवे वाला टेक्स्ट। ढेर से ढेर 4 स्ट्रिंग, हर एक के अधिकतम 256 अक्षर।
tools
tool_choice
आरे, ऑब्जेक्टना.उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरणसामुख्य उपकरण name, description औरी input_schema. अ web_search वी. ए. आर. सर्वर टूल चालू वेब खोजएन्थ्रोपिक के अन्य बिल्ट-इन टूल्स (बाश, टेक्स्ट एडिटर, कंप्यूटर का उपयोग) को अस्वीकार कर दिया गया है। unsupported_tool. tool_choice लेवेला auto, any, tool ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. noneए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, ए, disable_parallel_tool_use.
thinkingवस्तुना.{"type": "enabled", "budget_tokens": 8192}, {"type": "adaptive"} ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. {"type": "disabled"}बजट एक प्रयास स्तर को चुनता हैः 2,048 न्यूनतम से कम, 2,048 निम्न से, 8,192 मध्यम से, 16,384 उच्च से। अनुकूली उपयोग output_config.effortरे, या ऊँचा।
streamबुलियनना.Anthropic के इवेंट फॉर्मेट में स्ट्रीम करीं।
metadataवस्तुना.स्वीकार कइल गइल आ अनदेखा कइल गइल।

rRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

{
  "id": "msg_01c7a2f93e5b4d08",
  "type": "message",
  "role": "assistant",
  "model": "anthropic/claude-sonnet-5",
  "content": [{ "type": "text", "text": "A Lightning invoice is..." }],
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 1240,
    "output_tokens": 380,
    "cache_read_input_tokens": 0,
    "cache_creation_input_tokens": 0
  },
  "nymbot": { "balance": "pro", "charged_credits": 0.162, "charged_sats": 16.2, "balance_credits": 412.425, "balance_sats": 41242.5 }
}

content आर. ए. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. आर. ओ. tool_use ब्लॉक अउर ए thinking ब्लॉक, केहू के signature खाली बा। stop_reason खैर है end_turn, max_tokens, tool_use ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. refusal, ओही तरीका से निकालल गइल जइसन finish_reason चालू चैट कॉम्प्लीशन्स; stop_sequence नर हमेशहि nullउदाहरण के लिए, तब भी जब एक स्टॉप अनुक्रम उत्तर को समाप्त कर देता है। input_tokens r केवल ताज़ा इनपुट गणना करता है; कैश इनपुट दो कैश फ़ील्ड में है। लागत में है nymbot एस. पी. आर. ओब्जेक्ट एंड द X-Nymbot-Cost-Sats हेडर।

स्ट्रीम कइल गइल, घटना सभ Anthropic के ह: message_start, content_block_start, ping, content_block_delta (text_delta, input_json_delta ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. thinking_delta), content_block_stop, message_delta रुकन के कारण के साथ, उपयोग अउर उ nymbot लागत वस्तु, और message_stop. अ ping जब मॉडल काम कर रहल होला त हर 15 सेकंड में ई भी भेजल जाला। टूल कॉल टेक्स्ट के बाद आवेला, हर एके एगो रूप में tool_use एन. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. input_json_delta.

इस अंतिम बिंदु पर त्रुटियां एंथ्रोपिक के प्रारूप का उपयोग करती हैंः {"type": "error", "error": {"type": "not_found_error", "message": "…"}}रे....................................................................................................................................................................................................... 402 billing_error, एगो बोझल प्रदाता 503 overloaded_errorस्ट्रीम शुरू होवे के बाद अगर कवनो खराबी आवे त ओकरा के भेजल जाला एगो error कार्यक्रम।

cURL

curl https://nymbot.ai/api/v1/messages \
  -H "x-api-key: $NYMBOT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "What is a Lightning invoice?"}]
  }'

Python

import os
import anthropic

client = anthropic.Anthropic(base_url="https://nymbot.ai/api", api_key=os.environ["NYMBOT_API_KEY"])

message = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "What is a Lightning invoice?"}],
)
print(message.content[0].text)

JavaScript

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

const client = new Anthropic({ baseURL: "https://nymbot.ai/api", apiKey: process.env.NYMBOT_API_KEY });

const message = await client.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "What is a Lightning invoice?" }],
});
console.log(message.content[0].text);

टोकन गिनती जा रही है

rएक संदेश अनुरोध कितने इनपुट टोकन का उपयोग करेगा इसका एक अनुमान, ताकि एक ग्राहक भेजने से पहले जांच कर सके। यह मुफ़्त है, लेकिन फिर भी एक कुंजी की की आवश्यकता है।

POST https://nymbot.ai/api/v1/messages/count_tokens r------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -

शरीर के लिए के रूप में एक ही है सन्देश, बिना max_tokens; मॉडल के नाम के सुलझल (resolve) चाहीं। गिनती एगो अनुमान बा: सिस्टम प्रॉम्प्ट, मैसेज, टूल कॉल अउर टूल डेफिनिशन के अक्षर के चार से भाग देवे के होई, अउर हर तस्वीर खातिर 1,600 जोड़े के होई। ई प्रोवाइडर के अपना टोकनाइजर नइखे, एहसे असली गिनती अलग हो सकेला। एगो की (key) जेकर सीमा पूरा हो गइल बा, ऊ फिरो इस्तेमाल क सकेला।

rRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

{ "input_tokens": 318 }

cURL

curl https://nymbot.ai/api/v1/messages/count_tokens \
  -H "x-api-key: $NYMBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [{"role": "user", "content": "What is a Lightning invoice?"}]
  }'

Python

import os
import anthropic

client = anthropic.Anthropic(base_url="https://nymbot.ai/api", api_key=os.environ["NYMBOT_API_KEY"])

count = client.messages.count_tokens(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "What is a Lightning invoice?"}],
)
print(count.input_tokens)

JavaScript

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

const client = new Anthropic({ baseURL: "https://nymbot.ai/api", apiKey: process.env.NYMBOT_API_KEY });

const count = await client.messages.countTokens({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "What is a Lightning invoice?" }],
});
console.log(count.input_tokens);

मॉडलन के सूचीबद्ध कइल

जेवनो मॉडल अउर जनरेटर API स्वीकार करेला, ओकर लागत के साथ। ई लिस्ट ओही लाइव कैटलॉग से पढ़ल जाला जवन ऐप के पिकर में बा, ताकि ई हमेशा उहे रहे जवन सर्वर चलाई।

GET https://nymbot.ai/api/v1/models r------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -

GET /api/v1/models/{id} एक गो एंट्री वापस मिलेला।

खेतप्रकारजरूरी बाविवरण
typeस्ट्रिंग (क्वेरी)ना.chat (पूर्वनिर्धारित), image, video, audio, embedding ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. allr. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. a. image,video.

कीमत ऊ हऽ जवन रउआ चुकावत बानी, जवना में फीस अउर मार्जिन पहिले से शामिल बा, डॉलर अउर sats में बिटक्वाइन के वर्तमान कीमत पर। balance बतावेला कि मॉडल कवन बैलेंस खर्च करऽता। nymbot_key आरएआर ऐप में मॉडल का संक्षिप्त नाम है। created हमेशा 0 होला, काहे कि कैटलॉग ई रिकॉर्ड ना करेला कि कवनो मॉडल कबे जोड़ल गइल रहे। एगो मॉडल जेकर प्रकाशित टोकन दर ना होला, ओकर कीमत होला per_request बदला में।

nymbot/auto रे हमेशा प्रथम, कीमत के रूप में variableए, ए के साथ routes सूची प्रत्येक मानक मार्ग के दर देती है। यह दृष्टि और तर्क को सूचीबद्ध करती है, लेकिन उपकरणों को नहीं।

GET /api/v1/models/{id} आर. ए. आर. अनुरोध के रूप में समान नामों और उपनामों को स्वीकार करता है, और जिस मॉडल को वे तय करते हैं उसके लिए प्रविष्टि वापस करता है।

rRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

{
  "object": "list",
  "data": [
    {
      "id": "anthropic/claude-sonnet-5",
      "object": "model",
      "type": "chat",
      "owned_by": "anthropic",
      "name": "Claude Sonnet 5",
      "created": 0,
      "context_length": 1000000,
      "max_output_tokens": 64000,
      "architecture": { "input_modalities": ["text", "image"], "output_modalities": ["text"] },
      "supported_parameters": ["max_tokens", "temperature", "tools", "tool_choice", "reasoning", "response_format", "stop"],
      "capabilities": { "vision": true, "video": false, "tools": true, "reasoning": true, "web_search": true },
      "balance": "pro",
      "pricing": {
        "type": "per_token",
        "currency": "USD",
        "input_per_1M_tokens": 4.725,
        "output_per_1M_tokens": 23.625,
        "cache_read_per_1M_tokens": 0.4725,
        "sats_input_per_1M_tokens": 4038,
        "sats_output_per_1M_tokens": 20192
      },
      "description": "...",
      "nymbot_key": "claude-sonnet"
    }
  ]
}

दोसर प्रकार के:

  • Âइमेज एस. ए. आर. प्रविष्टियाँ capabilities (accepts_image_url, requires_image_url, editr) आ आ एकटा दाम per_generation.
  • वीडियो एस. ए. आर. प्रविष्टियाँ max_duration_seconds औरी resolutions, अउर एगो दाम per_second हर एगो रेजोल्यूशन खातिर।
  • ऑडियो एस. ए. आर. प्रविष्टियाँ audio_type speech ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. transcription, कीमत per_1k_chars ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. ए. आर. per_minute.
  • आरईबी एम्बेडिंग एस. ए. आर. प्रविष्टियाँ dimensions, context_length, max_inputs अउर प्रति दस लाख इनपुट टोकन के एगो दाम।

कीमत लिखल बा "estimated": true जिन जनरेटर की कीमत प्रकाशित नहीं की गई है, उसके लिए ऐप का अनुमान है। एक अज्ञात type वापसी 400.

cURL

curl "https://nymbot.ai/api/v1/models?type=chat"

Python

import requests

models = requests.get("https://nymbot.ai/api/v1/models", params={"type": "chat"}).json()["data"]
for m in models:
    print(m["id"], m["balance"], m["pricing"].get("input_per_1M_tokens"))

JavaScript

const res = await fetch("https://nymbot.ai/api/v1/models?type=chat");
const { data } = await res.json();
for (const m of data) console.log(m.id, m.balance, m.pricing.input_per_1M_tokens);