સામગ્રી પર જાઓ
Nymbot પર ક્લિક કરો

જ્ઞાનનો આધાર વિકાસકર્તાઓ

ચેટ, પ્રતિક્રિયાઓ અને સંદેશાઓ

મોડેલને કંઈક પૂછવાની ત્રણ રીતો, ત્રણ સ્વરૂપોમાં ગ્રાહકો પહેલેથી જ બોલે છે, બધા એક જ મોડેલ પર ચાલે છે અને તે જ રીતે બિલ આપે છે.

ચેટ સમાપ્તિઓ

ઓપનએઆઈ ચેટ ફોર્મેટ, અને જે લગભગ દરેક ટૂલ સપોર્ટ કરે છે. વાતચીતને અત્યાર સુધી મોકલો અને આગળનો સંદેશ પાછો મેળવો.

POST https://nymbot.ai/api/v1/chat/completions - API કીની જરૂર છે.

માત્ર model અને messages જરૂરી છે. પસંદ કરેલ મોડેલ ન લેતું નમૂનાનું પરિમાણ ભૂલ વિના છોડવામાં આવે છે, તેથી એક વિનંતી બોડી મોડેલોમાં કામ કરે છે. મોડેલ સૂચિ દરેક મોડેલની વિગતો આપે છે. supported_parametersજે વસ્તુને નકારી કાઢવાને બદલે નકારી કાઢવામાં આવે છે તે એવી વસ્તુ છે જે મોડેલ બિલકુલ કરી શકતું નથીઃ એક મોડેલ માટે ચિત્રો જે જોઈ શકતા નથી, એક મોડેલ માટે સાધનો જે તેમને કૉલ કરી શકતા નથી.

ફ્લાઇટપ્રકારજરૂરીવર્ણન
modelસ્ક્રીનહાnymbot/auto (અથવા auto) for Nymbot's routing on the standard balance, or a catalog model id such as anthropic/claude-sonnet-5 એપ્લિકેશનના કીવર્ડ્સ અને કીવર્ડ્સ પણ ઉપલબ્ધ છે. પ્રત્યય.
messagesએરેહાફોટો લાઈન, Roles 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
એરે, સ્ટ્રિંગ અથવા ઓબ્જેક્ટ, બુલિયનના.કૉપિરાઇટ © See ટિપ્પણીઓ. એ. web_search સાધન ચાલુ થાય છે વેબસાઇટ Searchમહત્તમ 128 સાધનો અને 512 KB વ્યાખ્યાઓ, મહત્તમ 64 સ્તરો ઊંડાણમાં ગોઠવાયેલ છે; વધુ એક છે 400.
reasoning_effort
reasoning
સ્ક્રીન, Objectના."minimal", "low", "medium" અથવા "high", અથવા {"effort": "high"}. "none" અથવા {"enabled": false} તેને બંધ કરો. જુઓ ઑનલાઇન.
pluginsએરેના.[{"id": "web", "max_results": 5}] હંમેશા પહેલા વેબ શોધો. 10 પરિણામો સુધી.
nઇન્ટરનેશનલના.1 – અલગ અલગ સાધનોનો ઉપયોગ કરો 400.
logit_bias
user
metadata
કૉપિરાઇટ - String, Objectના.સત્તાવાર રીતે આપવામાં આવે છે અને સત્તાવાર રીતે આપવામાં આવે છે. logit_bias - -100 થી 100 વચ્ચેના સંખ્યાઓ માટે 300 જેટલા ટાઇમ IDs પર નકશા; user આ ઉપરાંત 256 કાર્ટૂનનો પણ સમાવેશ થાય છે. metadata 16 string values, keys up to 64 characters અને values up to 512 છે.

જવાબ આપો એક સામાન્ય chat.completionખર્ચ સાથે usage.cost (ડોલરમાં) અને nymbot ઑનલાઇન model ઉકેલાયેલ મોડેલ આઈડી છે, તેથી ટૂંકું નામ સંપૂર્ણ તરીકે પાછું આવે છે. જો મોડેલ જવાબ આપતા પહેલા તર્ક કરે છે, તો તેનું તર્ક તેમાં છે message.reasoning_content, જવાબથી અલગ.

જવાબ

{
  "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_content); 20 થી વધુ ચિત્રો (too_many_images); ખોટા પ્રકાર અથવા શ્રેણીની બહારના નમૂનાનું પરિમાણ (invalid_value); એક ચિત્ર કડી જે સાર્વજનિક નથી (invalid_image_url); એક મોડેલ પરના સાધનો કે જે તેમને કૉલ કરી શકતા નથી (unsupported_tool); n 1 સિવાય; a :thinking એવા નમૂના પર પ્રત્યય કે જે તર્ક ન કરી શકે (model_not_found); અથવા પ્રદાતાએ વિનંતીનો ઇનકાર કર્યો (upstream_rejected).
402મોડેલ જે બાકીનો ખર્ચ કરે છે તે હોલ્ડને આવરી શકતું નથી.
403સૌથી ખરાબ સ્થિતિ કીની કેપમાં બંધબેસતું નથી (key_limit_reached) ની અંદર 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 એક A data: રેખા, અને પ્રવાહ સાથે સમાપ્ત થાય છે data: [DONE]Reasoning માંથી મેળવો delta.reasoning_contentજવાબ આપો in delta.content.

સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન સ્ક્રીન 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]
  • સાથે શરૂ થતી રેખાઓ : જીવંત ટિપ્પણીઓ હોય છે, જે દર 15 સેકંડમાં જ્યારે મોડેલ વિચારી રહ્યું હોય ત્યારે મોકલવામાં આવે છે. SSE ગ્રાહકો તેમને અવગણે છે.
  • માટે પૂછો. "stream_options": {"include_usage": true} ઉપરનો છેલ્લો ભાગ મેળવવા માટે, ખાલી સાથે choices, token count, કિંમત અને nymbot ઑનલાઇન
  • મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે, ભલે આપણે ધનવાન હોઇએ કે છાશવારે હોટલ કે રેસ્ટોરન્ટમાં જમવા જઇએ ત્યારે ક્યારેય આપણી થાળીમાં પડેલ અન્નનો બગાડ ક્યારેય ના કરીએ અને જો તે ખોરાક વધારે માત્રામાં છે તો તરત જ તેને પાર્સલ કરાવીને કોઇ ભૂખ્યાની આંતરડી ઠારીએ કારણ કે અંતે તો આપણી પરંપરા છે ને જ્યાં અન્નનો ટુકડો,ત્યા હરિ ઢુકડો
  • Previous Previous post: આટલું જ નહીં, આટલું જ નહીં, આટલું જ નહીં 401 અથવા 402, તેના સ્ટેડિયમ કોડ સાથે સામાન્ય JSON તરીકે ઓળખાય છે, જ્યારે તે સ્ટેડિયમ તરીકે ઓળખાય છે. data: {"error": {…}} ઘટના, અને પ્રવાહ વગર સમાપ્ત થાય છે [DONE].
  • સાધનો સાથેની વિનંતીઓ, અને ઓપનએઆઈના પ્રતિસાદ પરિવહન પરના નમૂનાઓ, પ્રદાતા પાસેથી પ્રવાહિત થતા નથી. તેઓ હજુ પણ માન્ય પ્રવાહ સાથે જવાબ આપે છે, જે જવાબ પૂર્ણ થયા પછી મોકલવામાં આવે છે.

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 અને મોડેલ જવાબ આપવાને બદલે કૉલ કરવા માટે પૂછી શકે છે. તમે કાર્ય ચલાવો, તેનું પરિણામ એક તરીકે ઉમેરો tool એ જ સંદેશ tool_call_id, અને વાતચીત ફરીથી મોકલો. નિમ્બોટ ક્યારેય તમારા કાર્યો ચલાવતો નથી; તે મોડેલની વિનંતીને તમને પાછા મોકલે છે.

tool_choice લે છે "auto", "none", "required" અથવા {"type": "function", "function": {"name": "…"}}ફોટો લાઈન મોબાઈલ એપ્લિકેશન્સ (capabilities.tools) અને સાધનો દ્વારા અરજી કરવામાં આવે છે 400 unsupported_tool પર nymbot/auto અને કેટલાક કૉપિરાઇટ મોડલ્સ જે OpenAIના Responses ટ્રાન્સફર પર કામ કરે છે, જેને 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 ચિત્રો વાંચી શકે છે. એક ઉમેરો image_url વપરાશકર્તા સંદેશનો ભાગ, ક્યાં તો જાહેર સંદેશ સાથે https:// Link અને A data:image/…;base64, યુઆરએલ. વિનંતી દીઠ 20 ચિત્રો સુધી. એસવીજી ચિત્રો નકારવામાં આવે છે, અને તે જ રીતે 4,096 અક્ષરોથી વધુની લિંક અથવા તેમાં વપરાશકર્તા નામ અથવા પાસવર્ડ ધરાવતી લિંક (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"}, અથવા Add :thinking મોડેલના નામ માટે, જેનો અર્થ થાય છે ઉચ્ચ પ્રયાસ. તર્ક વિના મોડેલ પર સેટિંગને અવગણવામાં આવે છે. nymbot/auto, :thinking વિનંતીને પ્રમાણભૂત તર્ક માર્ગ પર મોકલે છે.

એન્થ્રોપિક મોડેલો પર પ્રયાસ લગભગ 1,000,2,000,8,000 અથવા 16,000 ટોકન્સનું વિચારશીલ બજેટ બની જાય છે, ક્યારેય તેનાથી વધુ નહીં. max_tokens પરવાનગી આપે છે. વિચારવાનું ત્યારે છોડી દેવામાં આવે છે જ્યારે tool_choice સાધનને દબાણ કરે છે, અને જ્યારે વિનંતી સાધન લૂપ ચાલુ રાખે છે (તેનો છેલ્લો સંદેશ સાધન પરિણામ છે), કારણ કે એન્થ્રોપિકને તેને ફરી શરૂ કરવા માટે અગાઉ હસ્તાક્ષરિત વિચારની જરૂર છે. તે જ પ્રતિક્રિયાઓ અને સંદેશાઓના અંતિમ બિંદુઓ પર લાગુ પડે છે.

તર્ક પાછો આવે છે message.reasoning_content, અથવા 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);

મોડેલ પ્રત્યય

મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે. anthropic/claude-sonnet-5:online.

પ્રત્યયઅસર
:onlineપહેલા વેબ શોધે છે, જેમ કે plugins: [{"id": "web"}]. જુઓ. વેબસાઇટ Search.
:thinkingઉચ્ચ તર્ક પ્રયાસ; પર nymbot/auto, નિરાકરણ માર્ગ. એક મોડલ પર જે નિરાકરણ નથી કરી શકે, 400 model_not_found આ પણ વાંચોઃ “No Endpoints Found”
:nitro, :floor, :exacto, :extendedસ્વીકારવામાં આવે છે અને અવગણવામાં આવે છે. દરેક સૂચિ મોડેલનો એક માર્ગ હોય છે, તેથી પસંદ કરવા માટે કોઈ ઝડપી, સસ્તું અથવા લાંબુ નથી; પ્રત્યયની મંજૂરી છે જેથી અન્ય સેવાઓમાંથી નકલ કરેલા મોડેલ નામો હજુ પણ કામ કરે છે.

મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે, ભલે આપણે ધનવાન હોઇએ કે છાશવારે હોટલ કે રેસ્ટોરન્ટમાં જમવા જઇએ ત્યારે ક્યારેય આપણી થાળીમાં પડેલ અન્નનો બગાડ ક્યારેય ના કરીએ અને જો તે ખોરાક વધારે માત્રામાં છે તો તરત જ તેને પાર્સલ કરાવીને કોઇ ભૂખ્યાની આંતરડી ઠારીએ કારણ કે અંતે તો આપણી પરંપરા છે ને જ્યાં અન્નનો ટુકડો,ત્યા હરિ ઢુકડો 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 અગાઉના વપરાશકર્તા સંદેશ (વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક વૈશ્વિક.

  • હંમેશા શોધવા: "plugins": [{"id": "web", "max_results": 5}], અથવા એ :online મોડેલ પર પ્રત્યય.
  • જ્યારે તે મદદ કરે ત્યારે શોધો: "tools": [{"type": "web_search", "parameters": {"max_results": 5}}]આ પણ વાંચો: ACCEPTED AS web_search_preview અથવા openrouter:web_searchનિમ્બોટ ત્યારે જ શોધે છે જ્યારે પ્રશ્નને વર્તમાન માહિતીની જરૂર હોય તેવું લાગે છે, તે જ પરીક્ષણ જે એપ્લિકેશન ઉપયોગ કરે છે.

max_results મૂળભૂત રીતે 5 છે અને વધુમાં વધુ 10. સ્રોતો પાછા આવે છે nymbot.web_search.sourcesએક સાથે એક સાથે એક સાથે title, snippet અને url, અને as url_citation ટિપ્પણીઓ પર ક્લિક કરો.

જેની સમિક્ષા અગાઉની કૌમોની ભવિષ્યવાણીથી લઇને ગદીર સુધી અને ગદીરથી લઇને વિલાદતે બાસઆદત સુધી અને વિલાદતથી લઇને ઝુહુરના સમય સુધી ખુદાવંદે મોતઆલે તે ઝાતે ગીરામી કદ્રને બાકી રાખીને જાણે પોતાના ઉચ્ચ અને મહાન હેતુની નીચે પોતાના મહેબુબ અને ચુંટાએલા એટલે કે મુસ્તઝ્અફ બંદાઓને માટે એક નિશાન કાએમ કરી દીધુ છે કે જેથી માયુસીની ધુળ દામન પર બેસવા ન પામે.

જવાબ, અંશતઃ

"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

ઓપનએઆઈનું નવું સ્વરૂપ, ઓપનએઆઈ એજન્ટ્સ એસડીકે અને કોડેક્સ દ્વારા ઉપયોગમાં લેવાય છે. તે ચેટ કમ્પ્લીશન જેવા જ મોડલ, બિલિંગ અને સુવિધાઓ પર ચાલે છે.

POST https://nymbot.ai/api/v1/responses - API કીની જરૂર છે.

ફ્લાઇટપ્રકારજરૂરીવર્ણન
modelસ્ક્રીનહાતે અંગે તા. ચેટ સમાપ્તિઓ, પ્રત્યયોનો સમાવેશ થાય છે.
inputશબ્દમાળા અથવા એરેહાશબ્દમાળા, અથવા વસ્તુઓની સૂચિઃ સંદેશાઓ (ભૂમિકાઓ) user, assistant, system, developer) સાથે input_text, input_image અને output_text ભાગો અને function_call અને function_call_output સાધનો માટે ફીચર્સ. input_image લેવાઈ image_url લિંક અથવા ડેટા યુઆરએલ, ફાઇલ આઈડી નહીં. reasoning અને web_search_call ફ્લેશિંગ ફ્લેશિંગ; item_reference નકારવામાં આવે છે.
instructionsસ્ક્રીનના.સિસ્ટમ પ્રક્રિયાઓ.
max_output_tokensઇન્ટરનેશનલના.સૌથી વધુ ટિપ્પણીઓ વાંચવા માટે.
temperature
top_p
નંબરના.નમૂના નિયંત્રણ, જ્યાં મોડેલ તેમને લઈ જાય છે.
tools
tool_choice
parallel_tool_calls
એરે, સ્ટ્રિંગ અથવા ઓબ્જેક્ટ, બુલિયનના.ફોટો લાઈન આઇપીએલની શરૂઆત થવા જઈ રહી છે (Previous News){"type": "function", "name": …, "parameters": …}). એ. web_search અથવા web_search_preview સાધન ચાલુ થાય છે વેબસાઇટ Search આ ઉપરાંત, અન્ય આંતરરાષ્ટ્રીય સાધનો પણ અરજી કરી શકે છે.
reasoningઓબ્જેક્ટના.{"effort": "minimal" | "low" | "medium" | "high"}. xhigh અને max નમૂના high; none તેને બંધ કરો.
text.format
response_format
ઓબ્જેક્ટના.JSON એપ્લિકેશન અથવા JSON Scheme json_object.
metadataઓબ્જેક્ટના.પ્રતિભાવમાં કોઈ ફેરફાર કરાયો નથી. વધુમાં વધુ 16 શબ્દમાળા મૂલ્યો પર, 64 અક્ષરો સુધીની કીઓ અને 512 સુધીની કિંમતો.
streamબુલિયનના.નીચે વર્ણવ્યા મુજબ સ્ટ્રીમ ઇવેન્ટ્સ.
storeબુલિયનના.અવગણવામાં આવ્યું. કંઈ સંગ્રહિત નથી, અને જવાબ હંમેશા કહે છે "store": false.
previous_response_id
conversation
background
ટિપ્સ String, Object, Booleanના.આધારિત નથી : 400 unsupported_parameterટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ: ટિપ્પણીઓ input દરેક વખતે.

જવાબ

{
  "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 અને argumentsપરિણામ તરીકે પાછું મોકલો function_call_output એક જ વસ્તુ સાથે call_idતર્ક કરવો, જ્યારે મોડેલ તેને પાછું આપે છે, તે એક છે reasoning વસ્તુ સાથે reasoning_text કૉમન્સ પર ક્લિક કરો, first listed. status છે. incomplete જ્યારે જવાબ મળે છે max_output_tokens અથવા પ્રદાતાએ ના પાડી, સાથે incomplete_details.reason સ્થાપન max_output_tokens અથવા content_filterપ્રતિસાદ પણ ઓપનએઆઈની જેમ વિનંતીની સેટિંગ્સ (તાપમાન, સાધનો, સાધનની પસંદગી વગેરે) નો પડઘો પાડે છે, અને તે કરે છે nymbot Object કિંમત

સ્ટ્રીમ્ડ, દરેક ઇવેન્ટ એક છે event: રેખા અને એ data: Line with એ 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 અને .doneટૂલ કૉલ્સ સંદેશ પછી આવે છે, દરેક એક વસ્તુ તરીકે response.function_call_arguments.delta અને .done.

સ્થિતિક્યારે?
400ના. model અથવા input; previous_response_id, conversation, background અને એક item_reference (unsupported_parameter); અસમર્થિત સાધન અથવા સામગ્રીનો પ્રકાર.
402, 403, 404, 429, 502, 503Chat Completion વિશે વાંચો.

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 સંદેશાઓ

એન્થ્રોપિકનું બંધારણ, એન્થ્રોપિક એસ. ડી. કે. અને ક્લાઉડ કોડ માટે. તે સૂચિમાંના દરેક મોડેલ સાથે કામ કરે છે, માત્ર ક્લાઉડ જ નહીં, વિનંતીનું ભાષાંતર કરવામાં આવે છે, તે જ પાઇપલાઇન દ્વારા ચલાવવામાં આવે છે, અને પાછા અનુવાદિત કરવામાં આવે છે.

POST https://nymbot.ai/api/v1/messages - એક API કીની જરૂર છે, જેમ કે x-api-key અથવા Authorization: Bearer.

ધ. anthropic-version અને anthropic-beta મથાળાઓ સ્વીકારવામાં આવે છે અને અવગણવામાં આવે છે. એન્થ્રોપિક મોડેલ નામો સૂચિ સાથે મેળ ખાય છે, તેથી ક્લાઉડ કોડ અને એસડીકે તેઓ પહેલેથી જ ઉપયોગમાં લેતા નામો સાથે કામ કરે છેઃ

  • સૂચિ જાણે છે તે નામ, જેમ કે claude-sonnet-5 અથવા anthropic/claude-opus-5તેનો ઉપયોગ જેમ છે તેમ થાય છે.
  • નહિંતર તારીખ (-20260514), -latest, એક ટિપ્પણી tag such as -v1, એક કૌંસવાળું ટેગ જેમ કે [1m] અને એક anthropic/ અથવા anthropic. ઉપસર્ગ દૂર કરવામાં આવે છે, અને સંસ્કરણમાં બિંદુઓ અને ડેશ બંને રીતે અજમાવવામાં આવે છે (claude-haiku-4-5 શોધો claude-haiku-4.5).
  • મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે, ભલે આપણે ધનવાન હોઇએ કે છાશવારે હોટલ કે રેસ્ટોરન્ટમાં જમવા જઇએ ત્યારે ક્યારેય આપણી થાળીમાં પડેલ અન્નનો બગાડ ક્યારેય ના કરીએ અને જો તે ખોરાક વધારે માત્રામાં છે તો તરત જ તેને પાર્સલ કરાવીને કોઇ ભૂખ્યાની આંતરડી ઠારીએ કારણ કે અંતે તો આપણી પરંપરા છે ને જ્યાં અન્નનો ટુકડો,ત્યા હરિ ઢુકડો
  • એક નામ જે કંઇ મેળ ખાતું નથી તે પાછું આવે છે 404 not_found_error.
ફ્લાઇટપ્રકારજરૂરીવર્ણન
modelસ્ક્રીનહાએક કેશબેક મોડલ ID, અથવા એક Anthropic મોડલ નામ.
max_tokensઇન્ટરનેશનલહાસૌથી વધુ ટિપ્પણીઓ વાંચવા માટે.
messagesએરેહાuser અને assistant ટાઇમ્સ, with text, image (આધાર 64 અથવા યુઆરએલ સ્રોત), tool_use અને tool_result બ્રોડબેન્ડ thinking અગાઉના વળાંકમાંથી બ્લોક સ્વીકારવામાં આવે છે અને છોડવામાં આવે છે.
systemશબ્દમાળા અથવા એરેના.સિસ્ટમ પ્રોમ્પ્ટ, શબ્દમાળા અથવા લખાણ બ્લોક તરીકે.
temperature
top_p
નંબરના.નમૂના નિયંત્રણ, જ્યાં મોડેલ તેમને લઈ જાય છે. top_k સ્વીકારવામાં આવે છે અને કાઢી નાખવામાં આવે છે.
stop_sequencesશબ્દમાળાઓની શ્રેણીના.Text that ends the answer. ઑનલાઇન ઑનલાઇન ઑનલાઇન ઑનલાઇન ઑનલાઇન ઑનલાઇન ઑનલાઇન ઑનલાઇન
tools
tool_choice
એરે, ઓબ્જેક્ટના.સાધનો સાથે name, description અને input_schema. એ. web_search Server Tool પર ક્લિક કરો વેબસાઇટ 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બુલિયનના.એન્થ્રોપિકના ઇવેન્ટ ફોર્મેટમાં સ્ટ્રીમ કરો.
metadataઓબ્જેક્ટના.સત્તાવાર રીતે ઓળખવામાં આવે છે અને ઓળખવામાં આવે છે

જવાબ

{
  "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 Blocks અને A thinking બ્રહ્માંડ, whose signature મર્યાદિત છે. stop_reason છે. end_turn, max_tokens, tool_use અથવા refusal, એ જ રીતે કામ કર્યું finish_reason પર ચેટ સમાપ્તિઓ; stop_sequence હંમેશા null, પણ જ્યારે એક stop sequence જવાબ રજૂ કરે છે. input_tokens માત્ર નવા ઇનપુટની ગણતરી કરે છે; કેશ કરેલ ઇનપુટ બે કેશ ક્ષેત્રોમાં છે. કિંમતમાં છે nymbot વસ્તુ અને X-Nymbot-Cost-Sats હેડર.

સ્ટ્રીમ્ડ, ઘટનાઓ એન્થ્રોપિકની છેઃ message_start, content_block_start, ping, content_block_delta (text_delta, input_json_delta અથવા thinking_delta), content_block_stop, message_delta સ્ટેચ્યુ ઓફ યુનિટીના આંકડાઓ અનુસાર, the stop reason, the use and nymbot કિંમત વસ્તુઓ, અને message_stop. એ. ping આ ઉપરાંત, એપ્લિકેશનનો ઉપયોગ કરતી કંપનીઓ માટે એપ્લિકેશનનો ઉપયોગ કરતી કંપનીઓ માટે એપ્લિકેશનનો ઉપયોગ કરતી કંપનીઓ માટે એપ્લિકેશનનો ઉપયોગ કરવામાં આવે છે. tool_use આ પણ વાંચો: Block with its entire input in one input_json_delta.

errors on this endpoint use anthropic's format: આ એન્ડ્રોઇડ એન્ડ્રોઇડ એન્ડ્રોઇડ એન્ડ્રોઇડ એન્ડ્રોઇડ: {"type": "error", "error": {"type": "not_found_error", "message": "…"}}Short Balance ની કિંમત 402 billing_error, એક overloaded સપ્લાયર 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);

ટોકનની ગણતરી

મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે, ભલે આપણે ધનવાન હોઇએ કે છાશવારે હોટલ કે રેસ્ટોરન્ટમાં જમવા જઇએ ત્યારે ક્યારેય આપણી થાળીમાં પડેલ અન્નનો બગાડ ક્યારેય ના કરીએ અને જો તે ખોરાક વધારે માત્રામાં છે તો તરત જ તેને પાર્સલ કરાવીને કોઇ ભૂખ્યાની આંતરડી ઠારીએ કારણ કે અંતે તો આપણી પરંપરા છે ને જ્યાં અન્નનો ટુકડો.

POST https://nymbot.ai/api/v1/messages/count_tokens – એક API key જરૂર છે.

Body is the same as for અક્ષય કુમાર સંદેશાઓ, વિના max_tokensમિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે, ભલે આપણે ધનવાન હોઇએ કે છાશવારે હોટલ કે રેસ્ટોરન્ટમાં જમવા જઇએ ત્યારે ક્યારેય આપણી થાળીમાં પડેલ અન્નનો બગાડ ક્યારેય ના કરીએ અને જો તે ખોરાક વધારે માત્રામાં છે તો તરત જ તેને પાર્સલ કરાવીને કોઇ ભૂખ્યાની આંતરડી ઠારીએ કારણ કે અંતે તો આપણી પરંપરા છે ને જ્યાં અન્નનો ટુકડો.

જવાબ

{ "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 - ચાવીની જરૂર નથી. પાંચ મિનિટ માટે સંગ્રહિત.

GET /api/v1/models/{id} એક એન્ટ્રી પરત કરે છે.

ફ્લાઇટપ્રકારજરૂરીવર્ણન
typeશબ્દમાળા (ક્વેરી)ના.chat (વૃદ્ધિ અને અસરકારકતા) image, video, audio, embedding અથવા allકેટલાકને આ રીતે આપી શકાય છે. image,video.

કિંમતો તે છે જે તમે ચૂકવો છો, જેમાં ફી અને માર્જિન પહેલેથી જ ડોલરમાં અને વર્તમાન બિટકોઇન ભાવે સેટ્સમાં છે. balance તે કહે છે કે મોડેલની કિંમત શું છે. nymbot_key એપ્લિકેશનમાં મોબાઈલની કિંમતમાં વધારો થાય છે. created હંમેશા 0 હોય છે, કારણ કે જ્યારે મોડેલ ઉમેરવામાં આવ્યું હતું ત્યારે સૂચિ રેકોર્ડ કરતું નથી. પ્રકાશિત ટોકન દર વિનાના મોડેલની કિંમત નક્કી કરવામાં આવે છે. per_request તેના બદલે

nymbot/auto આ પણ વાંચો: Always first, priced as variableએ સાથે routes મિત્રો,આવી અસંખ્ય ડોક્યુમેન્ટ્રીઓ સરળતાથી ઇન્ટરનેટના માધ્યમથી જોઇ શકાય છે પરંતુ તેમાં આપવામાં આવતા સંદેશનો આપણે બહું ઓછા સ્વીકાર કરીએ છીએ, પરંતુ એક વાત શિખવા જેવી જરૂર છે કે.

GET /api/v1/models/{id} એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ એકાઉન્ટ્સ

જવાબ

{
  "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, edit) અને કિંમત 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);