Sylfaen wybodaeth Ymchwiliad
Chat, Cwestiynau a Ffoniadau
Mae'r tri o'r ffordd i chi'n chwilio am un model o beth, yn y tri fformatiau mae'r cwsmeriaid yn cael eu golygu, mae'r holl yn rhedeg ar yr un o'r modelau ac yn cael eu cyfrifo'n un o'r un.
Mae'r dudalen hon wedi'i chyfieithu â pheiriant er hwylustod. Y fersiwn Saesneg wreiddiol yw'r fersiwn berthnasol.
cyfieithu chat
Mae'r fformat chat OpenAI, a'r un o'r holl offer yn cefnogi. Gadewch y chadw ac yn cael y mesur nesaf yn ôl.
POST https://nymbot.ai/api/v1/chat/completions Ydych chi'n rhaid i'r API Key.
Yn unig model a messages Mae'r paramedr sampling y model dewisol yn cael ei ddelio heb gwahanu, felly mae'r corff cyswllt yn gweithio yn ystod y modelau. supported_parametersMae hyn sy'n cael ei adnabod yn ôl i'r modelau yn gallu gwneud unrhyw un: lluniau ar gyfer y modelau a'r modelau a'r offer ar gyfer y modelau a'r offer ar gyfer y modelau a'r cais.
| Ymchwiliad | Ymchwiliad | Ymchwiliad | Disgrifiad |
|---|---|---|---|
model | Ymchwiliad | Oes | nymbot/auto Ymchwiliad auto) ar gyfer routing Nymbot ar y balansi standard, neu ID model catalogaidd fel anthropic/claude-sonnet-5 ar y balansi Pro. Mae'r enw a'r adnabyddus y app hefyd yn cael ei ddelfrydol. Gellir Ymchwiliad. |
messages | Ymchwiliad | Oes | Ymchwiliad - Role system, developer (a ddefnyddir fel system), user, assistant a toolMae'r deunydd yn strwythur neu llestr o text a image_url rhannau; lluniau yn unig mewn misiau defnyddiwr. input_audio Mae'r ffeiliau yn cael ei adnabod. |
stream | Ymchwiliad | yn | Ffoniwch y cyswllt fel y mae'n ystyried. Ymladd. |
stream_options | Ymchwiliad | yn | {"include_usage": true} Mae'n cael ei addasu i'r cyfrif token a'r cost. |
max_tokensmax_completion_tokens | Ymchwiliad | yn | Mae'r rhan fwyaf o tokenau i'w scrifo. Dylunio i'r maxym o'r model os yw'n uchel. Mae hefyd yn sefydlu sut mae'n cael ei drin o'ch rheswm, felly mae nifer isel yn angen credyd isel i dechrau. |
temperaturetop_p | cyfres | yn | Ymchwiliad Sampling: temperature 0 i 2, top_p o 0 i 1. |
stop | String neu array | yn | Tystysgrif sy'n llai â'r ateb: strwythur neu uchaf o 4 strwythuriau, o hyd at hyd at hyd at 256. nymbot/auto. |
seed | Ymchwiliad | yn | Ar gyfer sampling repeatable, lle mae'r model yn cefnogi ei. |
presence_penaltyfrequency_penalty | cyfres | yn | Mae'r rheoli wedi'i reoli, bob un o -2 i 2. |
response_format | Ymchwiliad | yn | {"type": "json_object"} Yn {"type": "json_schema", "json_schema": {…}}, lle mae'r model yn cefnogi'n ei ddefnyddio nymbot/auto. |
toolstool_choiceparallel_tool_calls | Array, String neu Object, Boolean | yn | Ymchwiliad Lluniauyn a web_search Mae'r offer yn torri Ymchwiliad WEBYn fwy na 128 offer a 512 KB o adolygiadau, wedi'i rhedeg ar hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd. 400. |
reasoning_effortreasoning | Ymchwiliad, Object | yn | "minimal", "low", "medium" Yn "high"o {"effort": "high"}. "none" Yn {"enabled": false} Ydych chi'n ymgorffori. Rhyddhau. |
plugins | Ymchwiliad | yn | [{"id": "web", "max_results": 5}] Ymchwiliad ar y gwefan yn gyntaf. Hyd at 10 o ganlyniadau. |
n | Ymchwiliad | yn | Yn unig 1 - Mae pob un yn dod yn ôl 400. |
logit_biasusermetadata | Ystafell, String, Object | yn | Ydych chi'n cael ei adnabod ac nid yw'n cael ei adnabod. logit_bias Mapiau ar hyd at 300 token ids i cyfres o -100 i 100; user Mae'n fwy na 256 cyfres; metadata Mae'r cyswllt yn fwy na 16 o rhifau, mae'r cyswllt yn fwy na 64 o rhifau a mae'r rhifau yn fwy na 512. |
Mae'r adolygiad yn arferol chat.completionMae'r cost yn usage.cost
(yn doler) ac yn y nymbot Ymchwiliad model Mae'r model wedi'i adnabod yn cael ei adnabod, ac mae'r model wedi'i adnabod yn cael ei adnabod yn cael ei adnabod. message.reasoning_contentMae'n ddiddordeb o'r ateb.
Ymchwiliad
{
"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 Mae'n cael ei gynhyrchu o'r ystyried y bydd y cyflenwyr yn adolygu o'r arall: tool_calls Os yw'r model yn chwilio am offer, length os yw'r ateb wedi'i ddefnyddio bob token yn cael ei leoli (na'r model wedi'i gymryd i'r holl argymell ac wedi'i rannu unrhyw ateb), content_filter Mae'r cyflenwr yn adnabyddus, a stop
Ymchwiliad usage.completion_tokens_details.reasoning_tokens is always 0: token argymell hidden yn cael eu cyfrifo, ac yn cael ei leoli, yn completion_tokens.
| statws | Ymladd |
|---|---|
400 | yn model Yn messages (missing_required_parameter); rhan o ffeiliau audio neu ffeiliau, neu lluniau ar gyfer model sy'n cael ei weld (unsupported_content); mwy na 20 lluniau (too_many_images); paramedr sampling o'r math go iawn neu o'r farchnad (invalid_value); lluniau sy'n cael ei ddibynnu (invalid_image_url); offer ar y model sy'n cael ei chwilio (unsupported_tool); n Yn fwy na 1; a :thinking Mae'r cyfieithu yn cael ei ddibynnu ar y model (model_not_found); neu mae'r cyflenwr yn adnabod y gofynion (upstream_rejected). |
402 | Mae'r cyfansoddion y model yn gallu cwmpasu'r holding. |
403 | Mae'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf (key_limit_reached(Ychwanegwyd yn ôl) max_tokens Ydych chi'n rhedeg cap. |
404 | Nid yw'r model gyda'r enw hwn (model_not_found). |
429 | Mae'r cyswllt cyswllt, neu'r cyswllt o'r cyflenwr (upstream_rate_limited). |
502, 503 | Mae'r cyflenwr yn falch (upstream_error) neu yn cael eu cyffurio (upstream_overloadedYn ôl Retry-After). Nid yw'n cael ei gyfrifiadu os yw'r cyflenwr yn cael ei gyfrifiad ar gyfer y brofiad. |
Mae'r codau statws o bob rhannau endpoint yn cael eu rhestr o dan Erthyglau.
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);
Ymchwiliad
Yn "stream": true Mae'r adolygiad yn dod â'r adolygiadau sy'n dod â'r modelau. chat.completion.chunk Yn a data: llinell, ac mae'r llinell yn cyrraedd gyda data: [DONE]Mae'r argymell yn dod
delta.reasoning_contentMae'r ateb yn delta.content.
Stream unrhyw adnoddau sy'n cymryd mwy na 100 ymuno, megis adnoddau hir, adnoddau mawr
max_tokens neu modelau argymell. Mae gwestiynau sy'n cael ei strwythur yn anfon nad yw'r ateb yn llawn, ac mae'r rhwydwaith rhwng chi a Nymbot yn gallu chi'n llai gysylltiad anhygoel ar ôl tua 100 ymuno; mae'r modelau bob amser yn cael ei gwblhau ac mae'r ystyried yn cael ei lawrlwytho, ond mae'r ateb yn cael ei gwblhau. Mae'r strwythur yn send-alives, felly mae'n rhedeg ar gyfer pan fydd y modelau yn rhedeg.
Ymchwiliad
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]
- Lluniau dechrau gyda
:Mae'r adolygiadau yn cael eu chwilio, a wnaed yn unwaith ar 15 munud pan fydd y model yn chwilio. - Ymchwiliad
"stream_options": {"include_usage": true}i gael y trosglwyddo diweddaraf o'r top, gyda golygfeyddchoices, y token cyfrif, y cost a'rnymbotYmchwiliad - Mae'r llwytho yn cyfieithu ar ôl y llwytho yn cyrraedd. Os ydych chi'n ymgorffori'r cysylltiad yn awr, mae'r model yn cael ei ymgorffori: Mae Nymbot yn cyfieithu'r llwytho rest o'r cyflenwr, i hyd at 25 munud, i gael ei cyfrifon token, ac mae'n cael eu prynu i'r cyflenwr.
- Mae'r defnyddiwr yn cael ei adnabod yn ôl y cyfnod cyntaf, fel
401Yn402, yn dod yn ôl fel JSON safonol gyda'i cod statws, nid yw'n strwythur. Erthygl ar ôl y strwythur wedi dechrau yn dod yn ôldata: {"error": {…}}Ymchwiliad, ac mae'r strwythur yn cyrraedd[DONE]. - Ymgynghoriadau gyda'r offer, a'r modelau ar y cyfathrebu OpenAI's Responses, nid yn strwythur o'r cyflenwr. Mae'n ymgynghori â'r strwythur yn gilydd, a wnaed ar ôl y ateb yn llawn.
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);
}
Lluniau
Mae'r swyddogaethau yn tools a'r model yn gallu chwilio am un i'w chwilio yn ôl i'w ymgynghori. Ydych chi'n rhedeg y swyddogaeth, yn ychwanegu ei wyneb fel tool Meddalwedd gyda'r un
tool_call_idNymbot bob amser yn rhedeg eich swyddogaethau; mae'n canolbwyntio'r gofynion y model i chi.
tool_choice Ymweld "auto", "none",
"required" Yn {"type": "function", "function": {"name": "…"}}Mae'r llestr model yn marwrio'r modelau a gellir chi'n chwilio o offer (capabilities.tools) Mae'r offer yn cael eu rhyddhau gyda 400 unsupported_tool Yn nymbot/auto a ar y rhai modelau catalogau sy'n rhedeg ar y cyfathrebu Responses OpenAI, a mae'r Nymbot yn gallu canolbwyntio'r offer.
Yn "stream": true, mae'r cwestiynau gyda'r offer yn rhedeg mewn un pecyn a'r yna yn cael eu chwilio fel seiliad chunk normal: y rol, un chunk sy'n cwmpasu pob cwestiynau gyda'i allbwn, id, enw a argymennau, a chunk finishing.
Ymchwiliad, yn rhan
"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);
Mae'r lluniau yn gwestiynau
Modelau gyda capabilities.vision Ydych chi'n chwilio i'r lluniau. Add a image_url
cyfieithu i'r mis defnyddiwr, gan un o'r cyfieithu https:// Ymchwiliad a
data:image/…;base64, Ymchwiliad â'r cyswllt, mae'r cyswllt yn cael ei ddibynnu, ac mae'r cyswllt yn cael ei ddibynnu â'r cyswllt, ac mae'r cyswllt yn cael ei ddibynnu â'r cyswllt, ac mae'r cyswllt yn cael ei ddibynnu â'r cyswllt (400 invalid_image_urlMae opsiynau detail Yn
auto, low Yn high.
Yn nymbot/auto, mae'r gofynion gyda lluniau yn y mae'n cael ei rhedeg i'r model safonol sy'n cael ei weld. capabilities.vision Ymchwiliad ffotograffig gyda
400 unsupported_contentGall lluniau yn cael ei gael yn unig yn y misiau defnyddiwr. Mae'r cysylltiad rhaid i chi aros i mewn i'r gwerthwr diwydiannol; mae'r Nymbot yn darparu'r lluniau i'r cyflenwr y model ac nid yw'n rhedeg.
Mae'r llun yn cael ei leoli fel tokeniau cyfrif y cyflenwr ar gyfer ei, fel y rest o'r gofynion.
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);
Rhyddhau
Modelau gyda capabilities.reasoning Ydych chi canolbwyntio ar ôl ei adolygiadau. reasoning_effort ("minimal", "low",
"medium" Yn "high"o "reasoning": {"effort": "high"}Yn ychwanegu :thinking i'r enw model, sy'n golygu ansawdd uchel. Ar model heb argymell, mae'r gosod yn cael ei adolygu. nymbot/auto, :thinking Mae'r cyswllt yn cael ei ddibynnu i'r llwyfan argymell standard.
Yn y modelau Anthropic, mae'r anghenion yn buddsoddiad benderfynu o 1,000, 8,000 neu 16,000 tokens, nid yw'n fwy na max_tokens Ydych chi'n dychwelyd, mae'n dychwelyd pan fydd
tool_choice Mae'r gweinyddion yn cael ei ddefnyddio i'w chwilio, ac mae'r gweinyddion yn cael ei ddefnyddio i'w chwilio, ac mae'r gweinyddion yn cael ei ddefnyddio i'w chwilio, ac mae'r gweinyddion yn cael ei ddefnyddio i'w chwilio.
Mae'r argymell yn dod yn ôl message.reasoning_contento
delta.reasoning_content Ymchwiliad, nid yw'n cael ei gyfrifo i'r ateb. Mae'r argymell yn wyneb ac yn cael ei gyfrifo fel hyn, mewn completion_tokensMae rhai gwneuthurwyr yn dod â'r text argymell yn hollol, ac mae'n cael ei gwerthu.
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);
Modelau suffixes
Mae cyffuriau ar y enw model yn newid sut mae'r gofynion yn cael ei hwyluso, nid yw'n golau arall. Mae'n gweithio ar idau cyfanwerthu a'r enw cyfanwerthu yn unol, fel mewn anthropic/claude-sonnet-5:online.
| Ymchwiliad | Effeithiau |
|---|---|
:online | Wedi'i chwilio ar y wefan yn gyntaf, fel plugins: [{"id": "web"}]Yn Ymchwiliad WEB. |
:thinking | Ymchwiliad uchel; ar nymbot/auto, y ffordd argymell. Yn y model sy'n gallu argymell, 400 model_not_found gyda “no endpoints found”. |
:nitro, :floor, :exacto, :extended | Mae pob modelau catalog wedi un llwybr, felly nid yw'n cael ei ddewis yn gyflym, isel neu hir i'w dewis; mae'r ffugiau yn caniatáu felly mae'r enw modelau copio o'r gwasanaeth eraill hefyd yn gweithio. |
Mae'r enw cyfan yn cael ei gymryd yn gyntaf, felly mae'r model sy'n cynnwys'r ID colon yn bennaf yn gweithio; os nad oes, mae'r ffugiau yn cael eu gymryd o'r end un ar un o'r amser, hyd i'r model yn cyswllt. Gall enw model yn cael ei hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at hyd at 4 ffugiau; mae'n cael ei ryddhau gyda 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);
Ymchwiliad WEB
Mae Nymbot yn chwilio am y mesur y defnyddiwr diweddaraf (yn ei 2,000 o ddiddordebau cyntaf), yn lleoli'r dudalennau gorau ac yn rhoi'i i'r model gyda'r gwestiynau, sy'n cael ei marwio fel y defnyddiwr y mae'r model yn rhaid i'r defnyddiwr yn cael eu prynu ynni.
- Ymchwiliad:
"plugins": [{"id": "web", "max_results": 5}]Yn a:onlineYchwanegu ar y model. - Ymchwiliad pan fydd yn helpu:
"tools": [{"type": "web_search", "parameters": {"max_results": 5}}]Mae'n cael ei adnabod felweb_search_previewYnopenrouter:web_searchMae Nymbot yn chwilio yn unig pan fydd y cwestiynau yn cael ei angen i'r wybodaeth rhad ac yn cael ei ddefnyddio'r app.
max_results yn 5 o'r defnyddiwr a yn maks. 10. Mae'r deunyddiau yn dod yn ôl
nymbot.web_search.sourcesMae pob un yn a title, snippet a
urlMae'n as url_citation adnabyddus ar y mis.
Mae pob cyswllt sy'n rhedeg yn cost $0.008, yn cael ei rhedeg i sats, ar y blaen o'r token, ac mae'n rhan o'r hwyl. Mae'r dudalennau sy'n lleoli yn token ynni hefyd, felly mae'r ateb o'r gwefan yn cost mwy na'r un gwestiwn a wnaed yn hawdd, ac yna llawer o hyd yn fwy.
Ymchwiliad, yn rhan
"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);
Ymchwiliad
Mae'r fformat newydd o OpenAI, a ddefnyddir gan y OpenAI Agents SDK a gan y Codex. Mae'n rhedeg ar yr un model, cyfrifiad a nodweddion fel Chat Completions.
POST https://nymbot.ai/api/v1/responses Ydych chi'n rhaid i'r API Key.
| Ymchwiliad | Ymchwiliad | Ymchwiliad | Disgrifiad |
|---|---|---|---|
model | Ymchwiliad | Oes | Yn ôl cyfieithu chatYn cynnwys suffixes. |
input | String neu array | Oes | Un strwythur, neu llestr o elfennau: misiau (rolau) user, assistant, system, developera) gyda input_text, input_image a output_text rhannau, a function_call a function_call_output Dylunio ar gyfer offer. input_image Mae'r image_url Llinell neu URL data, nid ID ffeil. reasoning a web_search_call Mae'r cynhyrchion yn cael eu trosi; item_reference Ymchwiliad |
instructions | Ymchwiliad | yn | Ymchwiliad system. |
max_output_tokens | Ymchwiliad | yn | Mae'r rhan fwyaf o tokeniau i'w scrifo. |
temperaturetop_p | cyfres | yn | Mewngofnodiadau sampling, lle mae'r model yn cymryd eu. |
toolstool_choiceparallel_tool_calls | Array, String neu Object, Boolean | yn | Mae'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf o'r rhan fwyaf ({"type": "function", "name": …, "parameters": …}yn a web_search Yn web_search_preview Mae'r offer yn torri Ymchwiliad WEB Ydych chi'n helpu, mae'r offer eraill yn cael ei adnabod. |
reasoning | Ymchwiliad | yn | {"effort": "minimal" | "low" | "medium" | "high"}. xhigh a max Dylunio high; none Ychwanegu â ni. |
text.formatresponse_format | Ymchwiliad | yn | Mae'r cynhyrchion wedi'i adeiladu, fel schema JSON neu json_object. |
metadata | Ymchwiliad | yn | Mae'r cyswllt yn cael ei ddibynnu mewn'r adolygiadau. Yn fwy na 16 o rhifau, mae'r cyswllt yn fwy na 64 o rhifau, ac mae'r rhifau yn fwy na 512. |
stream | Ymchwiliad | yn | Stream events fel y defnyddir isod. |
store | Ymchwiliad | yn | Nid yw'n archebu, ac mae'r adolygiad yn bob amser yn adolygu "store": false. |
previous_response_idconversationbackground | strwythur, Object, Boolean | yn | Ymchwiliad: 400 unsupported_parameterMae'r adolygiadau yn cael eu storio, felly dewiswch y cyfieithu cyfan input Ymchwiliad |
Ymchwiliad
{
"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 }
}
Mae'r offer offer yn dangos yn output Yn a function_call Ymchwiliad
call_id, name a argumentsYchwanegu'r wyneb yn ôl a
function_call_output Mae'r cynnyrch gyda'r un call_idMae'r modelau, pan fydd y modelau yn dod i ni, yn a reasoning Ymchwiliad reasoning_text cyfieithu, yn cael ei adnabod yn gyntaf. status Yn incomplete Os yw'r ateb yn golygu
max_output_tokens Mae'r cyflenwr yn adnabyddus, gyda
incomplete_details.reason Ystafell max_output_tokens Yn
content_filterMae'r ateb hefyd yn echo i'r gosod (temperad, offer, dewis offer ac yn y blaen) fel y mae'r OpenAI yn ei wneud, ac yn caru'r nymbot Gwrthdaro Object.
Streamed, mae pob event yn un event: llinell a data: Llinell gyda A
sequence_numberYn y ffordd hwn: response.created,
response.in_progress, response.output_item.added,
response.content_part.addedMae pob cyfres o response.output_text.delta,
response.output_text.done, response.content_part.done,
response.output_item.doneYmchwiliad response.completed ar y defnyddiadau a'r cost. Mae'r ateb yn llai â'r llai response.incomplete Yn hysbys, ac yn hysbys ar ôl y strwythur yn dechrau gyda response.failed. rhyddhau strwythurau fel ei bodd ei hun gyda response.reasoning_text.delta a .doneFfoniadau offer yn dod ar ôl y mesur, yr un fel un element gyda response.function_call_arguments.delta
a .done.
| statws | Ymladd |
|---|---|
400 | yn model Yn input; previous_response_id, conversation, background Yn un item_reference (unsupported_parameter); peiriant neu deunydd math a ddefnyddir. |
402, 403, 404, 429, 502, 503 | Yn ôl y cyfieithu chat. |
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);
Meddalwedd Anthropig
Mae'r fformat Anthropic, ar gyfer y SDKs Anthropic a Claude Code. Mae'n gweithio gyda bob model o'r catalog, a dim ond Claude: mae'r gofynion yn cael ei ffonio, yn rhedeg drwy'r un pipeline, ac yn cael ei ffonio yn ôl.
POST https://nymbot.ai/api/v1/messages — mae'n rhaid i'r key API, fel x-api-key Yn Authorization: Bearer.
Mae'r anthropic-version a anthropic-beta Mae'r enw model anthropig yn cael ei gymharu â'r catalog, felly mae Claude Code a'r SDKs yn gweithio gyda'r enw a ddefnyddir:
- Mae'r enw sy'n gwybod, fel
claude-sonnet-5Ynanthropic/claude-opus-5Mae'n cael ei ddefnyddio fel y mae. - Datblygiad (
-20260514),-latestMae'r fersiwn fel-v1Mae'r cyswllt yn ddiddordeb fel[1m]Yn unanthropic/Ynanthropic.Mae'r cyswllt yn cael ei gymryd, ac mae'r dottedau a dottedau yn y fersiwn yn cael eu brofi'r ddau ffordd (claude-haiku-4-5Ymchwiliadclaude-haiku-4.5). - Os ydych chi'n dod o'r cyfieithu, mae'n cael ei ddefnyddio'r ffamilion (Opus, Sonnet neu Haiku), os yw'r fersiwn y catalog yn un neu newydd o'r fersiwn a ddefnyddir.
- Mae'r enw sy'n cyfieithu â ni
404not_found_error.
| Ymchwiliad | Ymchwiliad | Ymchwiliad | Disgrifiad |
|---|---|---|---|
model | Ymchwiliad | Oes | Model catalog ID, neu enw model Anthropig. |
max_tokens | Ymchwiliad | Oes | Mae'r rhan fwyaf o tokeniau i'w scrifo. |
messages | Ymchwiliad | Oes | user a assistant Ymchwiliad, gyda text, image (base64 neu'r gwefan URL), tool_use a tool_result Ymchwiliad thinking Blocks o'r turiau awr yn cael ei dderbyni ac yn cael ei dderbyni. |
system | String neu array | yn | System prompt, fel strwythur neu blociau text. |
temperaturetop_p | cyfres | yn | Mewngofnodiadau sampling, lle mae'r model yn cymryd eu. top_k Ydych chi'n cael ei adnabod ac yn dod. |
stop_sequences | Ymchwiliad o Strings | yn | Tystysgrifau sy'n cyswllt y cyswllt. Yn fwy na 4 strings, yn fwy na 256 cyfres. |
toolstool_choice | Ymchwiliad, Object | yn | Mae'r offer gyda name, description a input_schemayn a web_search Mewngofnodi Server Tool Ymchwiliad WEBMae'r offer eraill o Anthropic (bash, text-editor, defnyddiwr peiriant) yn cael eu rhyddhau gyda unsupported_tool. tool_choice Ymweld auto, any, tool Yn noneYn y disable_parallel_tool_use. |
thinking | Ymchwiliad | yn | {"type": "enabled", "budget_tokens": 8192}, {"type": "adaptive"} Yn {"type": "disabled"}Mae'r buddsoddi yn dod o lefel o ansawdd: isod o 2.048 minimal, o 2.048 low, o 8.192 medium, o 16.384 high. output_config.effortYma mae'n uchel. |
stream | Ymchwiliad | yn | Stream mewn fformat event Anthropic. |
metadata | Ymchwiliad | yn | Ychwanegu a ignoreiddio. |
Ymchwiliad
{
"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 Gellir ei drin tool_use blwch a thinking
Bloc, mae'r signature Ymchwiliad. stop_reason Yn
end_turn, max_tokens, tool_use Yn refusalMae'n gweithio'n gyffredin fel finish_reason Yn
cyfieithu chat; stop_sequence Ymchwiliad
null, hyd yn oed os ydych chi'n cyfieithu y cyswllt. input_tokens Mae'r cyfrifon yn unig yn cael eu cyfrifo; mae'r cyfrifon cache yn y dwy llinellau cache.
nymbot Mae'r Object a X-Nymbot-Cost-Sats Ymchwiliad
Ymchwiliad, mae'r gweithgareddau yn Anthropic: message_start,
content_block_start, ping, content_block_delta
(text_delta, input_json_delta Yn thinking_delta),
content_block_stop, message_delta Yn ôl y gofynion, mae'r defnyddio a'r nymbot Mae'r cost object, a message_stopyn a ping Mae'r cyfieithu cyfieithu yn cael eu cyfieithu yn unol â'r modelau. Mae'r cyfieithu cyfieithu yn cael eu cyfieithu yn unol â'r text.
tool_use blwch gyda'i holl ynni yn un input_json_delta.
Error ar y endpoint hwn yn defnyddio'r fformat Anthropic:
{"type": "error", "error": {"type": "not_found_error", "message": "…"}}Mae'r balanse yn gyflym 402 billing_errorMae'r cyflenwr yn overloaded
503 overloaded_errorUn defnyddiwr ar ôl ei dechrau yn cael eu chwilio fel error Ymchwiliad
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);
Cyfrifo token
Mae'r amrywiaeth o'r nifer o tokeniau yn cael ei ddefnyddio ar gyfer gwestiynau Messages, felly mae'r cleientiaid yn chwilio i'r cleientiaid. Mae'n rhad ac am ddim, ond mae angen cleiant.
POST https://nymbot.ai/api/v1/messages/count_tokens Mae'n rhaid i chi gael API Key.
Mae'r corff fod yn un MeddalweddYn ôl max_tokens; mae'r enw model yn cael ei gyfrifo. Mae'r cyfrifiad yw'r cyfrifiad: mae'r math o'r cyfrifiad system, adolygiadau, adolygiadau offer a definitiadau offer yn cael ei gyfrifo gan sgwâr, yn ogystal â 1,600 ar gyfer pob llun. Mae'n unrhyw tokenizer ei hun, felly gall y cyfrifiad real yn amrywiol.
Ymchwiliad
{ "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);
Llwytho model
Mae pob model a generadur i'r API yn dderbyn, gyda'r cost. Mae'r llestr yn cael ei leoli o'r un cyfrifiaduron ar-lein fel'r picker's app, felly mae'n bob amser y bydd y serwr yn rhedeg.
GET https://nymbot.ai/api/v1/models — no key needed. Cyd-fynd i 5 munud.
GET /api/v1/models/{id} Rydw i mewn i mewn.
| Ymchwiliad | Ymchwiliad | Ymchwiliad | Disgrifiad |
|---|---|---|---|
type | Ymchwiliad (query) | yn | chat (Ydych chi'n cael y defnyddiadau), image, video, audio, embedding Yn allMae'n gallu cael ei ddarparu, fel image,video. |
Prisiau yw'n y byddwch yn rhoi, gyda'r farchnad a marw wedi'i gael yn, yn doler a yn sats ar y pris Bitcoin rhad ac yn awr. balance Mae'r model yn ddiddordeb i'r cyfansoddiad.
nymbot_key yw'r enw cynhwysydd yn y app. created Mae'n bob amser 0, oherwydd bod y catalogaidd yn cael ei logio pan fydd model wedi'i ychwanegu. Mae'r model heb gyfradd token a phrisir per_request yn lle.
nymbot/auto Yn gyntaf, mae'r prisiau fel variableYn ôl a
routes Mae'r rhestr yn darparu'r cyflymder ar gyfer pob llwybr standard. Mae'n llwytho'r ystyried a'r argymell, ond nid yw'r offer.
GET /api/v1/models/{id} Mae'r enw a'r adnabyddus yn cael ei dderbyni fel gwestiynau, ac mae'n dderbyni'r adnoddau ar gyfer y model sy'n dderbyni â.
Ymchwiliad
{
"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"
}
]
}
Mae'r fath eraill:
- Ymchwiliad Ymchwiliad
capabilities(accepts_image_url,requires_image_url,edit) a prisiauper_generation. - fideo Ymchwiliad
max_duration_secondsaresolutionsMae'r prisper_secondar gyfer yr un o'r resolution. - Ymchwiliad Ymchwiliad
audio_typespeechYntranscriptionPrisiauper_1k_charsYnper_minute. - Ymchwiliad Ymchwiliad
dimensions,context_length,max_inputsMae'r pris yn un miliwn o token.
Prisiau Marci "estimated": true yw'r estimat o'r app ar gyfer generadur a'r pris yw'n cael ei ddibynnu. type Ymchwiliad 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);