Hriatna (knowledge base) a ni Siamtu te
Chat, Chhanna leh Message-te
किसी मॉडल से कुछ पूछने के तीन तरीके, तीन प्रारूपों में क्लाइंट पहले से ही बोलते हैं, सभी एक ही मॉडल पर चलते हैं और एक ही तरह से बिल करते हैं।
He page hi awlsam zawk nan machine hmanga lehlin a ni. English original hi a hman dan tur version a ni.
Chat Completions
ए. एफ. ओपन. ए. आई. चैट प्रारूप, और लगभग हर उपकरण समर्थन करता है। अब तक वार्तालाप भेजें और अगला संदेश वापस प्राप्त करें।
POST https://nymbot.ai/api/v1/chat/completions — API key a mamawh.
केवल model leh messages पी. एच. ई. आवश्यक है। एक नमूना पैरामीटर जिसे चुना गया मॉडल नहीं लेता है उसे बिना किसी त्रुटि के छोड़ दिया जाता है, इसलिए एक अनुरोध निकाय सभी मॉडलों में काम करता है। मॉडल सूची प्रत्येक मॉडल का विवरण देती है। supported_parametersजिस चीज को छोड़ने के बजाय अस्वीकार कर दिया जाता है वह कुछ भी है जो मॉडल बिल्कुल नहीं कर सकता हैः एक मॉडल के लिए चित्र जो देख नहीं सकता है, एक मॉडल के लिए उपकरण जो उन्हें कॉल नहीं कर सकता है।
| Chhungkhar/Hmun | ए. डब्ल्यू. ए. प्रकार | कियत् आवश्यक | Hrilhfiahna |
|---|---|---|---|
model | thlawp | Awle | nymbot/auto (अथवा auto) Nymbot's routing standard balance atana, emaw catalog model id ang chiah atan, entirnan anthropic/claude-sonnet-5 प्रो बैलेंस। ऐप के छोटे नाम और उपनाम भी स्वीकार किए जाते हैं। एक में समाप्त हो सकता है प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्ययी प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय प्रत्यय. |
messages | array | Awle | कथोपकथन। भूमिका system, developer (प्रणाली के रूप में माना जाता है), user, assistant leh tool. Content chu string emaw a hnuai ami list a ni text leh image_url ई. वी. भाग; चित्र केवल उपयोगकर्ता संदेशों में। input_audio पी. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. इ. आर. |
stream | बुलियन | Aih lo | A chhanna chu a ziak dan ang ngei chuan rawn thawn rawh. En teh स्ट्रीमिंग. |
stream_options | thil | Aih lo | {"include_usage": true} टोकन गणनाओं और लागत के साथ एक अंतिम हिस्सा जोड़ता है। |
max_tokensmax_completion_tokens | पूर्णांक संख्या | Aih lo | लिखने के लिए सबसे अधिक टोकन। मॉडल के अधिकतम तक कम किया जाता है यदि अधिक हो। यह भी निर्धारित करता है कि आपकी शेष राशि से कितना रखा गया है, इसलिए एक छोटी संख्या को शुरू करने के लिए कम क्रेडिट की आवश्यकता होती है। |
temperaturetop_p | number | Aih lo | Sampling controls: temperature 0 atanga 2 thleng, top_p 0 atanga 1 thleng. |
stop | string nge array | Aih lo | पाठ जो उत्तर को समाप्त करता हैः एक स्ट्रिंग या अधिकतम 4 स्ट्रिंग, प्रत्येक में अधिकतम 256 वर्ण। nymbot/auto. |
seed | पूर्णांक संख्या | Aih lo | रिपीटेबल सैंपलिंग के लिए, जहाँ मॉडल इसे सपोर्ट करता है। |
presence_penaltyfrequency_penalty | number | Aih lo | पुनरावृत्ति नियंत्रण, प्रत्येक-2 से 2 तक। |
response_format | thil | Aih lo | {"type": "json_object"} り {"type": "json_schema", "json_schema": {…}}, modelin a support lehna hmunah. Hman loh a ni ṭhin. nymbot/auto. |
toolstool_choiceparallel_tool_calls | array, string emaw object, boolean | Aih lo | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< टूल कॉलवा. ए. web_search khawl a ṭan web hmuhnaTool atanga 128 a tam ber leh definition 512 KB a tam ber, level 64 a tam ber chunga thuk thei; a tam zawk chu a... 400. |
reasoning_effortreasoning | thumal, thil | Aih lo | "minimal", "low", "medium" り "high", emaw {"effort": "high"}. "none" り {"enabled": false} उह इसे बंद कर देता है। देखो ngaihtuahna. |
plugins | array | Aih lo | [{"id": "web", "max_results": 5}] हमेशा वेब पर पहले सर्च करें। 10 तक परिणाम पाएं। |
n | पूर्णांक संख्या | Aih lo | 1 chauh. A dang zawng zawngin a rawn. 400. |
logit_biasusermetadata | ऑब्जेक्ट, स्ट्रिंग, ऑब्जेक्ट | Aih lo | A lo pawm tawh a, mahse a la luh leh lo. logit_bias token id upihte 300 chhung chu number -100 atanga 100 inkarah a thlak a; user पी. एच. ओ. अधिकतम 256 अक्षरों का होता है। metadata string value at most 16 nei thei a, keys hi character 64 vel leh values hi character 512 vel nei thei turin a rem thei. |
उ. प्र. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. इ. chat.completion, man chhuah leh usage.cost
(dollar-ah) leh ___ ah nymbot thil. model resolved model id a ni,
chuvangin hming tawi a rawn chhuak thei a, a hming chau chu a rawn chhuak vek a ni. Model chuan chhanna pek hmaa a ngaihtuah hmasa a nih chuan, a
ngaihtuahna chu a hnuaia amiahah a awm e message.reasoning_contentओह्, जवाब से अलग।
Chhanna
{
"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 thil lo thlen tawh atanga siam a ni, thil pek thei (providers) te hian an sawi dan an danglam hle vang a ni: tool_calls modelin hmanrua a dil hian, length "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" content_filter thlenziau tein an hnawl veleh, leh stop
अन्यथा. usage.completion_tokens_details.reasoning_tokens a chu a ni reng 0: awm lo
reasoning tokens te hi an chhut, leh, man an chhut thin, i completion_tokens.
| पी. टी. यू. स्थिति | कद... |
|---|---|
400 | Aih lo model り messages (missing_required_parameter); audio emaw file emaw, nge thlalak emaw, a hmu thei lo model atan (unsupported_content); thlalak zat hla zawng, 20 aiin (too_many_images); sampling parameter dik lo emaw a thlan tur aia nasa/tlem zawk (invalid_valueफी); एक तस्वीर लिंक जो सार्वजनिक नहीं है (invalid_image_url); एक मॉडल पर उपकरण जो उन्हें कॉल नहीं कर सकते (unsupported_tool); n 1 के अलावा अन्य; a :thinking thil ngaihtuah thei lo model hnuaihun hnuaia thil inziak ✍️model_not_found); emaw thil cung dawngtuin a duh zawng a lo hnawl thei lo (upstream_rejected). |
402 | Model hman lai balance kha hold zat a tawk lo. |
403 | Case thil chhia ber chu key chhip nen a in lo (key_limit_reached). A hniam zawk max_tokens ni lo vaiin limit hi tam zawkah siam rawh. |
404 | उस नाम का कोई मॉडल नहीं (model_not_found). |
429 | Key rate limit emaw, provider ta emaw (upstream_rate_limited). |
502, 503 | प्रदाता असफल (upstream_error) emaw a lian lutuk (upstream_overloaded, के साथ Retry-After). जब तक प्रदाता ने प्रयास के लिए बिल नहीं लिया है तब तक कुछ भी शुल्क नहीं लिया जाता है। |
Endpoint zawng zawngin an hman chung status code-te hi he hnuai ami-ah a inziak e. गलतीआं घटाओ.
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 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. data: रेखा, और धारा के साथ समाप्त होता है data: [DONE]रीजनिंग अंदर आती है
delta.reasoning_contentओहो, जवाब delta.content.
Chhanna in aia tam deuh emaw, thil lian deuh emaw ang zawngin tâmin tâmin second 100 aia rei thei tur thil engpawh stream rawh.
max_tokens एक अनुरोध जो स्ट्रीम नहीं किया जाता है, जवाब पूरा होने तक कुछ भी नहीं भेजता है, और आपके और निम्बॉट के बीच का नेटवर्क लगभग 100 सेकंड के बाद एक निष्क्रिय कनेक्शन बंद कर सकता है; मॉडल अभी भी समाप्त हो जाता है और जो उसने लिखा है उसे चार्ज कर दिया जाता है, लेकिन जवाब खो जाता है। एक धारा कीप-अलाइव भेजती है, इसलिए जब तक मॉडल लिखता है तब तक यह खुला रहता है।
वाह् स्ट्रीम्
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]
- Thla iṭan
:keep-alive comments, sawng hnuai thil hriat tur a ni a, model hriat chian tum lai hian second 15 chhungapi a rawn thawn thin a. SSE client-te chuan an tel lo. - Khawngaihin zawt rawh
"stream_options": {"include_usage": true}खाली के साथ, उपरोक्त अंतिम भाग प्राप्त करने के लिएchoices, token count te, hlawh lehnymbotthil. - Stream a tawp hnuah man chhut chhuah tur a awm ang. I connection sut hma viau chuan, model chu a sut loh ang: Nymbot chuan token count hriat nan provider stream dang awm tawh kha second 25 thlengin a chhiar leh ang, chumi hnuah provider report-in a hriat tur i hlawh ang. Chutih loh chuan, man chhut chhuah tur chu i input leh a ziak tawh atanga estimate siam a ni ang, chumi hnuah reasoning model atan output allowance zawng zawng chu a chhung vek ang.
- प्रथम खण्ड के पहले एक त्रुटि, जैसे
401り402, a lo la return chu status code nen JSON pangngai mai a ni a, stream a ni lo. Stream lo tan hmasak hnu lama sualna (error) a lo chhuak chuan a tawpah a lo thleng thindata: {"error": {…}}thil thleng, chhunzawmna endem leh...[DONE]. - Tools nei requests leh OpenAI's Responses transport-a model-te hi provider atangin an stream ngai lo. Chibai an pe thei si, chhanna an siam zawh veleh stream dik tak an thawn leh thin.
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 chhunzawmna leh model chuan chhang lovin a hman duh apiang a dil thei a. Function chu i hman tir a, a thil chhuah chu i thil hman turah i dah leh dawn a tool thil ang thuhmun nen thupui pakhatna hian
tool_call_id,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
tool_choice लेता है। "auto", "none",
"required" り {"type": "function", "function": {"name": "…"}}मॉडल सूची चिह्नित करती है कि कौन से मॉडल टूल को कॉल कर सकते हैं (capabilities.tools). Hmanrua te chu
thih (refused) an ni 400 unsupported_tool eng nge tihna le? nymbot/auto और ओपनएआई के रेस्पॉन्स ट्रांसपोर्ट पर चलने वाले कुछ कैटलॉग मॉडलों पर, जिन्हें निम्बॉट टूल्स पास नहीं कर सकता है।
के साथ "stream": true, tool nei request chu thil pakhat mai inhmanghmangin a kal a, chumi hnuah chunk sequence pangngai anga lo kal leh ngei ngei a ni: a role, tool call hmanhmang zawng zawng (a index, id, hming, leh arguments) neih chunk pakhat, leh finish chunk. Tool call stream chhiar thei client-te chuan tlangpui anga an enkawl ang a ni.
प्रतिक्रिया, आंशिक रूप से
"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);
आर. एफ. ओ. अनुरोधे चित्र
Model-te nei hnuaia capabilities.vision thlalak a chhiar thei. Thil pakhat chhan rawh image_url
user message hnuaia hnuaia awm, a hmun awmzia a zirawtu (public) emaw... https:// लिंक या ए
data:image/…;base64, URL. Request tin thlalak 20 chhungin hmang thei a ni. SVG thlalak te leh character 4,096 a tam zawk link, emaw user name emaw password awm leh link te chu an pawm lo ang (400 invalid_image_url). Thlan tlak loh/tih duh loh detail ni
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);
Ngaihtuahna leh hriatthiamna
Model-te nei hnuaia capabilities.reasoning chhanna an pek hmaa ngaihtuah thei an ni. A tam leh a tlem zual tur hi an dil thei ang reasoning_effort ("minimal", "low",
"medium" り "high") अथवा "reasoning": {"effort": "high"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, :thinking प्रतिमानक नाम, यानि उच्च प्रयास। प्रतिमानक पर बिना किसी तर्क के सेटिंग को नजरअंदाज कर दिया जाता है। nymbot/auto, :thinking standard reasoning route-ah hian
request a thawn.
एंथ्रोपिक मॉडलों पर प्रयास लगभग 1,000,2,000,8,000 या 16,000 टोकन का एक विचारशील बजट बन जाता है, जो कभी भी उससे अधिक नहीं होता है। max_tokens अनुमति देता है। सोच को छोड़ दिया जाता है जब
tool_choice एक टूल को मजबूर करता है, और जब अनुरोध एक टूल लूप को जारी रखता है (इसका अंतिम संदेश एक टूल परिणाम है), क्योंकि इसे फिर से शुरू करने के लिए एंथ्रोपिक को पहले हस्ताक्षरित सोच की आवश्यकता होती है। यही प्रतिक्रियाओं और संदेशों के अंतिम बिंदुओं पर भी लागू होता है।
तर्क वापस आता है message.reasoning_content, emaw
delta.reasoning_content स्ट्रीमिंग के दौरान, उत्तर में कभी नहीं मिलाएं। रीजनिंग आउटपुट है और अंदर इस तरह से चार्ज किया जाता है। 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 hming atanga suffix hman hian field dang hmang lova request hman dan a thlak thin. Id zawng leh hming tawi te pawh an la thawh thei reng a, entirnan, anthropic/claude-sonnet-5:online.
| Hming hnuai thlak | वी. एच. प्रभाव |
|---|---|
:online | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< plugins: [{"id": "web"}]........................................................................................................................................................................................................ web hmuhna. |
:thinking | Ngaihtuahna hman tam lutuk; êng nymbot/autoउदाहरण के लिए, तर्क मार्ग। एक मॉडल पर जो तर्क नहीं कर सकता, 400 model_not_found “endpoint hmuh chhuak lo” nen. |
:nitro, :floor, :exacto, :extended | Accepted leh hnawtchhuah a ni. Catalog model tinah hmanrua pakhat a awm vek a, chuvangin thlang tur a awm zawk, a tlawm zawk, emaw a tawi zawk pawh a awm lo; suffix-te hi an rem a, hei hian service dang atanga copy-a lak model hmingte pawh an hman leh thei reng ang. |
Suffix dang zawng zawng chu an hnawlngdai lo ang. Hming zawng zawng kha hmasa berin an tum ang; chu chuan a lo phal lo a nih chuan, id-ah colon a awm reng pawhin a la thei ang; chu chuan a lo phal lo a nih chuan, model hming a lo inrem chhung thlengin a hnuai lam atanga suffix tihnawl tawn tawnin an hnawlngdai ang. Model hming hi character 200 inthlengin a awm thei a, suffix atanga 4 inthleng chauh a beih thei; a aia aia a inthleng leh chuan hetiang hian a hnawlngdai ang: 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);
Web search thiamna
Chat model reng rengin live web atangin an chhan thei a. Nymbotin hmasa ber user message (a character 2,000 hmasa ber) kha a zawng a, thurual tak takte a chhiar a, zawhna nen khan a model hnenah a hlan a, a hman tur loh leh instruction lak loh tur 'outside content' anga hriat turin a ruat a ni. Mode pahnih a awm:
- Engtik lai pawhin zawng zel rawh:
"plugins": [{"id": "web", "max_results": 5}], a nih loh leh a:onlineमॉडल पर प्रत्यय। - जेब्ला मदद मिले खोजो:
"tools": [{"type": "web_search", "parameters": {"max_results": 5}}], leh loh lehweb_search_previewりopenrouter:web_search. Nymbot zawngchhuak hrim hrim chu zawhna chuan thil thar hriat chian a mamawh ang ngei a nih hian, app siamtuin a siam ang ang ngei hian a zawng chhuak a ni.
max_results default atan 5 a ni a, a chang chuan 10 a thleng thei bawk. Chutah chuan hmun hrang hrang atangin a rawn chhuak a
nymbot.web_search.sources, mahni hrang hrangin a title, snippet leh
url, leh leh url_citation संदेश पर टिप्पणियाँ।
Search hmang apiangin tokens hnuah sats-a convert tawh, $0.008 a cham a, chu chu hold hnuaia awm a ni. A lo chhiak zawng page-te pawh input tokens an ni bawk a, chuvangin web atanga chhanna lak hi zawhna hman lawk ang aiin a man a tam zawk thin a, a chang chuan a tam hle bawk.
प्रतिक्रिया, आंशिक रूप से
"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);
ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि. आइ.-ए. पि.
ओपनएआई एजेंट्स एसडीके और कोडेक्स द्वारा उपयोग किया जाने वाला ओपनएआई का नया प्रारूप। यह चैट कंप्लीशन के समान मॉडल, बिलिंग और सुविधाओं पर चलता है।
POST https://nymbot.ai/api/v1/responses — API key a mamawh.
| Chhungkhar/Hmun | ए. डब्ल्यू. ए. प्रकार | कियत् आवश्यक | Hrilhfiahna |
|---|---|---|---|
model | thlawp | Awle | जिखिजादोआ Chat Completions, प्रत्यय शामिल हैं। |
input | string nge array | Awle | एक स्ट्रिंग, या वस्तुओं की सूचीः संदेश (भूमिकाएँ) user, assistant, system, developer) input_text, input_image leh output_text विविध भाग, तथा function_call leh function_call_output औजारों के लिए वस्तुओं को काटें। input_image वह एक लेता है image_url ईएफआई लिंक या डेटा यू. आर. एल., फाइल आई. डी. नहीं। reasoning leh web_search_call आइटम स्किप किए गए हैं; item_reference hnawl/chhiat a ni. |
instructions | thlawp | Aih lo | प्रणाली निर्देश। |
max_output_tokens | पूर्णांक संख्या | Aih lo | Ziahnawn tur token tam ber. |
temperaturetop_p | number | Aih lo | नमूनाकरण नियंत्रण, मॉडल उन्हें कहाँ ले जाता है। |
toolstool_choiceparallel_tool_calls | array, string emaw object, boolean | Aih lo | Function hmanrua te, Responses hmelhmangah ({"type": "function", "name": …, "parameters": …}). ए. web_search り web_search_preview khawl a ṭan web hmuhna मदद मिलने पर रोक लगाएँ। अन्य अन्तर्निर्मित उपकरण अस्वीकार कर दिए जाते हैं। |
reasoning | thil | Aih lo | {"effort": "minimal" | "low" | "medium" | "high"}. xhigh leh max मतलब high; none हूर् इवा बन्द कर्षे। |
text.formatresponse_format | thil | Aih lo | JSON schema emaw... json_object. |
metadata | thil | Aih lo | Chhannaah chuan a hnawt chhuah loh a ni. String value atanga 16 aia tam loh, key hmun atanga character 64 aia tam loh leh value hmun atanga character 512 aia tam loh. |
stream | बुलियन | Aih lo | A hnuaia tarlan ang hian event-te stream rawh. |
store | बुलियन | Aih lo | को नजरअंदाज किया गया। कुछ भी संग्रहीत नहीं है, और जवाब हमेशा कहता है "store": false. |
previous_response_idconversationbackground | स्ट्रिंग, ऑब्जेक्ट, बूलियन | Aih lo | समर्थित न्हयः 400 unsupported_parameterप्रतिक्रियाएं संग्रहीत नहीं हैं, इसलिए पूरी बातचीत को अंदर भेजें। input hun lai zawng zawngin. |
Chhanna
{
"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 ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. ए. function_call जिस वस्तु के साथ
call_id, name leh arguments; thil chhuah chhuak chu 'a' anga rawn thawn rawh
function_call_output एक समान वस्तु call_id. Reasoning, a model
chhuah hian, a tuna reasoning जिस वस्तु के साथ reasoning_text सामग्री, पहले सूचीबद्ध। status ni incomplete किन्हीं मौकों पर जवाब आयेगा
max_output_tokens or अल्लॆङ्कि प्रदाता ने मना कर दिया, के साथ
incomplete_details.reason सेट करूँगा max_output_tokens り
content_filterChhanna hian request settings (temperature,
tools, tool choice leh chengkhat te pawh OpenAI-a ang deuhin a rawn chhawp chhuak bawk a, a thleng bawk... nymbot chitlam
thil.
Streamed, thil thleng tin chu an... event: line leh a data: ए. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के.
sequence_number, hetiang order hian: 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 leh .doneटूल कॉल संदेश के बाद आते हैं, प्रत्येक के साथ एक आइटम के रूप में response.function_call_arguments.delta
leh .done.
| पी. टी. यू. स्थिति | कद... |
|---|---|
400 | Aih lo model り input; previous_response_id, conversation, background anih lohleh an 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);
Anthropic Thuchahna te
एन्थ्रोपिक एसडीकेएस और क्लाउड कोड के लिए एंथ्रोपिक का प्रारूप। यह कैटलॉग में हर मॉडल के साथ काम करता है, न केवल क्लाउडः अनुरोध का अनुवाद किया जाता है, उसी पाइपलाइन के माध्यम से चलाया जाता है, और वापस अनुवाद किया जाता है।
POST https://nymbot.ai/api/v1/messages φ-API की चाहींदी है, जैसे x-api-key り Authorization: Bearer.
ए. आर. ओ. आर. anthropic-version leh anthropic-beta Header-te hi an pawm a, an hman lo pawh an ni. Anthropic model hmingte hi catalog nen an inrem tlat a, chuvangin Claude Code leh SDK-te hian an hman tawh hmingte hmang chuan an thawk thei a:
- सूचीपत्र ज्ञात नाम, उदा.
claude-sonnet-5りanthropic/claude-opus-5ρ, येरकम हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड हैयरकास्टेड है - A nih loh chuan ni (
-20260514),-latest, version tag ang chi a ṭawp zawngah a ṭha deuh ang-v1, एक ब्रैकेटेड टैग जैसे कि[1m]chuan lehanthropic/りanthropic.<<उपसर्ग हटा दिए जाते हैं, और संस्करण में डॉट्स और डैश दोनों तरीकों से आज़माए जाते हैं (claude-haiku-4-5तिमिंगल ढूँढनाclaude-haiku-4.5). - यदि वह अभी भी कुछ भी मेल नहीं खाता है, तो परिवार (ओपस, सॉनेट या हाइकू) का उपयोग किया जाता है, जब तक कि कैटलॉग का संस्करण मांगे गए संस्करण के समान या नया हो।
- एक नाम जो कुछ भी मेल नहीं खाता, वापस आता है।
404not_found_error.
| Chhungkhar/Hmun | ए. डब्ल्यू. ए. प्रकार | कियत् आवश्यक | Hrilhfiahna |
|---|---|---|---|
model | thlawp | Awle | Catalog model id, emaw Anthropic model hming. |
max_tokens | पूर्णांक संख्या | Awle | Ziahnawn tur token tam ber. |
messages | array | Awle | user leh assistant हू मुड़ता है, के साथ text, image (आधार 64 अथवा यू. आर. एल. स्रोत), tool_use leh tool_result ब्लॉक्स. thinking सिगांनि मोड़ों के ब्लॉकों को स्वीकार किया जाता है और गिरा दिया जाता है। |
system | string nge array | Aih lo | सिस्टम प्रॉम्प्ट, एक स्ट्रिंग या टेक्स्ट ब्लॉक के रूप में। |
temperaturetop_p | number | Aih lo | नमूनाकरण नियंत्रण, मॉडल उन्हें कहाँ ले जाता है। top_k आरआर स्वीकार की जाती है और छोड़ दी जाती है। |
stop_sequences | स्ट्रिंग्स की सरणी | Aih lo | Chhanna sutbawmna text. String 4 aia tam loh, mi tin character 256 aia tam loh. |
toolstool_choice | सरणी, ऑब्जेक्ट | Aih lo | यन्त्रोपकरण name, description leh input_schemaवा. ए. web_search सर्वर टूल चालू web hmuhnaएन्थ्रोपिक के अन्य बिल्ट-इन टूल्स (बाश, टेक्स्ट एडिटर, कंप्यूटर का उपयोग) को अस्वीकार कर दिया गया है। unsupported_tool. tool_choice लेता है। auto, any, tool り none, आ. disable_parallel_tool_use. |
thinking | thil | Aih lo | {"type": "enabled", "budget_tokens": 8192}, {"type": "adaptive"} り {"type": "disabled"}बजट एक प्रयास स्तर को चुनता हैः न्यूनतम 2,048 के नीचे, 2,048 के निचले स्तर से, 8,192 के मध्यम स्तर से, 16,384 के उच्च स्तर से। अनुकूली उपयोग output_config.effortअरे, या ऊँचा। |
stream | बुलियन | Aih lo | एन्थ्रोपिक इवेंट फॉर्मेट में स्ट्रीम करें। |
metadata | thil | Aih lo | Lo pawm leh ngaihtuah loh. |
Chhanna
{
"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 tuia lo tan thei bawk tool_use ब्लोक्स एंड ए thinking
block, tu ta signature a awm lo. stop_reason ni
end_turn, max_tokens, tool_use り refusal,
chu ang ngeia a thawklawm a ni finish_reason eng nge tihna le?
Chat Completions; stop_sequence सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा सर्वदा सदा
nullहां, भले ही एक स्टॉप सीक्वेंस जवाब को समाप्त कर दे। input_tokens count laktet
input thar chauh; cached input chu cache field pahnihah a awm a. A man chu a...
nymbot thil leh kha X-Nymbot-Cost-Sats हेड लेंथ लेंथ लेंथ।
A thil thlengte chu Anthropic-a thil thleng an ni: message_start,
content_block_start, ping, content_block_delta
(text_delta, input_json_delta り thinking_delta),
content_block_stop, message_delta a tawp chhan, hman dan leh
chu nymbot cost object, leh message_stopवा. ए. ping माडल के काम करने के दौरान भी हर 15 सेकंड में भेजा जाता है। टूल कॉल पाठ के बाद आते हैं, प्रत्येक एक के रूप में
tool_use पूरे इनपुट के साथ एक में ब्लॉक करें input_json_delta.
इस अंतिम बिंदु पर त्रुटियां एंथ्रोपिक के प्रारूप का उपयोग करती हैंः
{"type": "error", "error": {"type": "not_found_error", "message": "…"}}ए. ए. ओ................................................................................................................................................................................................... 402 billing_error, thiam hle tak/thiam lutuk
503 overloaded_error. Stream a lo tan hnu lama thil sual a awm chuan hetiang hian hrilhna a rawn thawn thin a 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);
Token count siamna
Messages request hman tur input token zat engzat nge an hman ang tih hriatna, chuvangin client-in a thawn hmaa han en thei tur a ni. A free a, mahse key a ngai reng a ni.
POST https://nymbot.ai/api/v1/messages/count_tokens — API key a ngai. A free.
Thawpui hi a hman ang ang a ni e सन्देश, बिना max_tokens; model hming hi a hriat tur a ni. He count hi hriat chauh (estimate) a ni: system prompt, message, tool call leh tool definition character-te nga li in chiah leh thlalak tinah 1,600 tel bawk a ni. Provider-a tokenizer dik tak a ni lo va, chuvangin a count dik tak hi a innei thei lo thei ang. Limit a thlen tawh pawh key hman la, a hmang thei reng ang.
Chhanna
{ "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);
सूचीबध्द माडल
ए. पि. आइ. अपनाए गए प्रत्येक मॉडल और जनरेटर की कीमत के साथ स्वीकार करता है। सूची को ऐप के पिकर के रूप में उसी लाइव कैटलॉग से पढ़ा जाता है, इसलिए यह हमेशा वही होता है जो सर्वर चलाएगा।
GET https://nymbot.ai/api/v1/models — key a ngai lo. Minute lima minute chhung turin a awm reng ang.
GET /api/v1/models/{id} entry pakhat a rawn siam chhuak.
| Chhungkhar/Hmun | ए. डब्ल्यू. ए. प्रकार | कियत् आवश्यक | Hrilhfiahna |
|---|---|---|---|
type | string (zawhna) | Aih lo | chat (a tlangpui), image, video, audio, embedding り allवा. के रूप में कई दिए जा सकते हैं। image,video. |
Man hi i chawp chhuah tur a ni a, fee leh margin pawh a tel tawh a, dollar leh sats hmangin Bitcoin man dik tak atang chuan a awm a ni. balance मॉडल खर्च किस संतुलन के बारे में बताता है।
nymbot_key app-a atanga model hming tawi chu a awm em? created a lo awm reng thin a, catalog-ah khan model awm hmasa reng tur awm rei leh awm lo a inziak loh avangin. token rate chhuak lo model hi a man hi a hman tur a ni per_request aiah.
nymbot/auto a hmasa reng thin, man erawh chu variableए. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के. के.
routes standard route tlawm zah leh hman dan tarlanna a ni a. vision leh reasoning a tarlang a,
tools erawh a tarlang lo.
GET /api/v1/models/{id} एक अनुरोध के रूप में वही नाम और उपनाम स्वीकार करता है, और जिस मॉडल का संकल्प करता है, उसके लिए प्रविष्टि वापस करता है।
Chhanna
{
"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"
}
]
}
अन्य प्रकारः
- ए. डब्ल्यू. एच. छवि entry lakah a awm
capabilities(accepts_image_url,requires_image_url,edit) leh lei manper_generation. - वीडियो entry lakah a awm
max_duration_secondslehresolutionsवाह, और एक कीमतper_secondप्रत्येक संकल्प के लिए। - Ri entry lakah a awm
audio_typespeechりtranscription, कीमतper_1k_charsりper_minute. - Embedding entry lakah a awm
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);