Anthropic
Ang POST /v1/messages ay tumatanggap ng request sa Anthropic Messages format at sumasagot sa parehong format, naka-stream man o hindi. Gamitin ito sa Anthropic SDK at sa mga tool na nakabatay dito, gaya ng Claude Code: i-set ang base URL, gamitin ang iyong Shannon API key at pangalanan ang isang Shannon model id.
POST https://api.shannon-ai.com/v1/messages
Ituro ang Anthropic SDK sa Shannon base URL. Idinaragdag ng SDK ang /v1/messages at ipinapadala ang iyong key sa x-api-key header.
import anthropic
client = anthropic.Anthropic(
api_key="YOUR_API_KEY",
base_url="https://api.shannon-ai.com",
)
message = client.messages.create(
model="shannon-3",
max_tokens=1024,
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
for block in message.content:
if block.type == "text":
print(block.text) import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.shannon-ai.com",
});
const message = await client.messages.create({
model: "shannon-3",
max_tokens: 1024,
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
for (const block of message.content) {
if (block.type === "text") console.log(block.text);
} curl https://api.shannon-ai.com/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "shannon-3",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}' Ang reply ay isang message na ang content ay isang listahan ng mga block. Hanapin ang mga block ayon sa kanilang type: kapag nag-reason ang model, ang unang block ay thinking at kasunod nito ang text.
{
"id": "msg_5f0c1e7a9b3d4c62a8e1f07d2b46c9a3",
"type": "message",
"role": "assistant",
"model": "shannon-3",
"content": [
{
"type": "thinking",
"thinking": "The user wants a greeting in one sentence. Keep it short and friendly."
},
{
"type": "text",
"text": "Hello, it is good to meet you."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 1184,
"output_tokens": 46
}
} Mga header
| Header | Value | Paglalarawan |
|---|---|---|
x-api-key | YOUR_API_KEY | Ang iyong API key. Tinatanggap bilang kapalit nito ang Authorization: Bearer YOUR_API_KEY. |
content-type | application/json | Kinakailangan. |
anthropic-version | 2023-06-01 | Tinatanggap, hindi kinakailangan. Ipinapadala ng Anthropic SDK ang 2023-06-01; pareho ang format ng reply anuman ang value. |
anthropic-beta | Tinatanggap, hindi kinakailangan. | |
x-request-id | Opsyonal. Ang sarili mong id para sa request. Bumabalik ito nang walang pagbabago sa reply; kung wala ito, may id ang reply na 12 hexadecimal na character. |
Mga request field
messages lamang ang kinakailangan. Pinangangalanan ng column na Ina-apply ng ang mga model kung saan binabago ng isang field ang reply. Ang mga hosted open-weight model ay ang labindalawang id sa listahan ng model; ang pamilyang Shannon 3 ay shannon-3, shannon-3-pro, shannon-3.1 at shannon-3.1-pro. Mga model at presyo
| Field | Type | Default | Paglalarawan | Ina-apply ng |
|---|---|---|---|---|
model | string | shannon-1.6-lite | Isang Shannon model id mula sa listahan ng model. Ipadala ito sa bawat request. Hindi case-sensitive ang pagtutugma. Ang anumang ibang pangalan ay nagbabalik ng 400 unknown model, kaya ang tool na nagpapadala ng sarili nitong mga pangalan ng model ay kailangang i-set sa isang Shannon id. | Lahat ng model |
messages | array | Kinakailangan. Ang conversation, pinakamatandang mensahe muna, na may mga role na user at assistant. Tingnan ang Messages at content blocks sa ibaba. | Lahat ng model | |
system | string | array | Mga tagubilin para sa model: isang string, o isang array ng mga text block. Tingnan ang System prompt sa ibaba. | Mga hosted open-weight model, shannon-1.6-*, shannon-2-*, shannon-coder-1 | |
max_tokens | integer | 4096 | Pinakamataas na limitasyon ng reply, sa tokens. Opsyonal sa endpoint na ito; palaging ipinapadala ito ng Anthropic SDK. Ang value na wala sa 1 hanggang 65,536 ay ililipat sa saklaw na iyon. Ito rin ang halagang itinatabi mula sa iyong balance habang tumatakbo ang request. | Mga hosted open-weight model, shannon-1.6-lite, shannon-1.6-pro, shannon-coder-1 |
stream | boolean | false | Ipinapadala ng true ang reply bilang server-sent events. Tingnan ang Streaming sa ibaba. | Lahat ng model |
temperature | number | Sampling temperature. Sa mga hosted open-weight model, pinananatili ang mga value sa pagitan ng 0 at 2. | Mga hosted open-weight model, shannon-1.6-lite, shannon-1.6-pro, shannon-coder-1 | |
top_p | number | Nucleus sampling. | Mga hosted open-weight model | |
stop_sequences | array | Hanggang 4 na string. Natatapos ang sagot bago ang una sa mga lumabas. Nananatiling end_turn ang stop_reason. | Mga hosted open-weight model | |
tools | array | Ang mga tool na maaaring tawagin ng model, bawat isa bilang {"name", "description", "input_schema"}. Tingnan ang Tools sa ibaba. | Lahat ng model | |
tool_choice | object | Hinahayaan ng {"type": "auto"} ang model na magpasya, pinipilit ng {"type": "any"} itong tumawag ng tool, pinipilit ng {"type": "tool", "name": "…"} itong tawagin ang tool na iyon. | Mga hosted open-weight model | |
thinking | object | Gaano karami ang pag-reason ng model bago sumagot. Tingnan ang Thinking sa ibaba. | Mga hosted open-weight model | |
web_search | boolean | false | Karagdagan ng Shannon sa format: hinahayaan ng true ang model na mag-search sa web bago sumagot. | shannon-1.6-*, shannon-2-*, pamilyang Shannon 3 |
Kung walang max_tokens, ang value ay 4,096, at 65,536 sa shannon-coder-1.
Tinatanggap ang metadata, top_k, service_tier at mga cache_control marker sa mga block para tumakbo nang walang pagbabago ang kasalukuyang client code. Hindi nito binabago ang reply; awtomatiko ang prompt caching sa mga hosted open-weight model.
Ang JSON na sagot ayon sa isang schema ay hinihingi gamit ang response_format sa Chat Completions at text.format sa Responses. Structured outputs
Isang request na may system prompt at thinking
Nagpapadala ang request na ito ng system prompt, thinking budget, temperature at stop sequence. Gumagamit ito ng hosted open-weight model, na ina-apply ang lahat ng ito.
import anthropic
client = anthropic.Anthropic(
api_key="YOUR_API_KEY",
base_url="https://api.shannon-ai.com",
)
message = client.messages.create(
model="DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
max_tokens=4096,
system="You are a physics teacher. Answer in two sentences.",
thinking={"type": "enabled", "budget_tokens": 2048},
temperature=0.3,
stop_sequences=["\n\n"],
messages=[{"role": "user", "content": "Why is the sky blue?"}],
)
for block in message.content:
if block.type == "thinking":
print("reasoning:", block.thinking)
elif block.type == "text":
print("answer:", block.text)
print(message.usage) import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.shannon-ai.com",
});
const message = await client.messages.create({
model: "DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
max_tokens: 4096,
system: "You are a physics teacher. Answer in two sentences.",
thinking: { type: "enabled", budget_tokens: 2048 },
temperature: 0.3,
stop_sequences: ["\n\n"],
messages: [{ role: "user", content: "Why is the sky blue?" }],
});
for (const block of message.content) {
if (block.type === "thinking") console.log("reasoning:", block.thinking);
if (block.type === "text") console.log("answer:", block.text);
}
console.log(message.usage); curl https://api.shannon-ai.com/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
"max_tokens": 4096,
"system": "You are a physics teacher. Answer in two sentences.",
"thinking": {"type": "enabled", "budget_tokens": 2048},
"temperature": 0.3,
"stop_sequences": ["\n\n"],
"messages": [{"role": "user", "content": "Why is the sky blue?"}]
}' Sa mga hosted open-weight model, iniuulat ng usage ang mga token na binasa mula sa prompt cache nang hiwalay sa iba pang input tokens.
{
"usage": {
"input_tokens": 31,
"cache_read_input_tokens": 0,
"cache_creation_input_tokens": 0,
"output_tokens": 62
}
} System prompt
Ang system ay isang string, o isang array ng mga text block sa anyong [{"type": "text", "text": "…"}]. Pinagdurugtong ng line break ang mga text ng mga block.
Ina-apply ito ng mga hosted open-weight model, shannon-1.6-lite, shannon-1.6-pro, shannon-2-lite, shannon-2-pro at shannon-coder-1. Sa isang id ng pamilyang Shannon 3, ilagay sa user message ang mga tagubiling dapat masunod.
Messages at content blocks
May role ang isang message, user o assistant, at isang content. Ang content ay isang string, o isang array ng mga block.
| Block | Paglalarawan | Available sa |
|---|---|---|
{"type": "text", "text": "…"} | Text. | Lahat ng model |
{"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": "…"}}{"type": "image", "source": {"type": "url", "url": "…"}} | Isang image sa isang user message, bilang base64 o sa pamamagitan ng URL. | Pamilyang Shannon 3, shannon-1.6-lite, shannon-1.6-pro, at ang mga hosted open-weight model na may image input |
{"type": "document", "source": {"type": "base64", "media_type": "application/pdf", "data": "…"}} | Isang dokumento (PDF, Word, PowerPoint o Excel) sa isang user message, bilang base64 o sa pamamagitan ng URL. | Pamilyang Shannon 3 |
{"type": "tool_use", "id": "toolu_…", "name": "…", "input": {…}} | Sa isang assistant message: isang tool call na ginawa ng model sa naunang reply. | Lahat ng model |
{"type": "tool_result", "tool_use_id": "toolu_…", "content": "…"} | Sa isang user message: ang resulta ng call na iyon. Ang content ay isang string, o isang listahan ng mga text block. | Lahat ng model |
Maaari mong ipadala muli ang content ng naunang reply nang buo: binabasa ang mga text at tool_use block, nilalaktawan ang mga thinking block.
Sa mga Shannon tier, binabasa ang mga image at dokumento mula sa huling user message. May sariling pahina ang mga laki at limitasyon. Mga image at file
Thinking
Minamapa ng mga hosted open-weight model ang thinking sa isang reasoning effort. Kung walang field, mataas ang effort.
| Anyo | budget_tokens | Epekto |
|---|---|---|
{"type": "disabled"} | Walang reasoning. Walang thinking block ang reply. | |
{"type": "enabled", "budget_tokens": 2048} | ≤ 2,048 | Mababang effort. |
{"type": "enabled", "budget_tokens": 8192} | ≤ 8,192 | Katamtamang effort. |
{"type": "enabled", "budget_tokens": 16000} | > 8,192 | Mataas na effort. |
Ibinabalik ng model na nag-re-reason ang reasoning nito bilang block na {"type": "thinking", "thinking": "…"} bago ang text. Ipinapadala rin ito ng mga Shannon tier na nag-re-reason.
Inilalarawan ang mga effort sa kanilang sariling pahina. Reasoning effort
Tools
Ang tool ay isang function na pinapatakbo ng iyong code. Ilarawan ang bawat isa gamit ang name, description at input_schema. Kapag gusto ng model ng tool, may tool_use block ang reply at ang stop_reason ay tool_use.
Isang tool definition sa tools:
[
{
"name": "get_weather",
"description": "Current weather for a city.",
"input_schema": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
]
}
}
] Ang content ng reply na tumatawag dito:
[
{
"type": "text",
"text": ""
},
{
"type": "tool_use",
"id": "toolu_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
"name": "get_weather",
"input": {
"city": "Paris"
}
}
] Patakbuhin ang tool, saka ipadala muli ang request na may call at isang tool_result block na idinagdag sa messages:
[
{
"role": "user",
"content": "What is the weather in Paris?"
},
{
"role": "assistant",
"content": [
{
"type": "tool_use",
"id": "toolu_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
"name": "get_weather",
"input": {
"city": "Paris"
}
}
]
},
{
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_3d9a7c1e5b2f4a60c8e1d7f09b24a6c5",
"content": "{\"temperature_c\": 18, \"sky\": \"cloudy\"}"
}
]
}
] tool_choice
| Anyo | Epekto | Ina-apply ng |
|---|---|---|
{"type": "auto"} | Nagpapasya ang model kung tatawag ng tool. Ito ang default. | Lahat ng model |
{"type": "any"} | Dapat tumawag ang model ng isa sa mga tool. | Mga hosted open-weight model |
{"type": "tool", "name": "…"} | Dapat tawagin ng model ang pinangalanang tool. | Mga hosted open-weight model |
Mga tool lang na may input_schema ang binabasa. Hindi tool ang web search sa endpoint na ito: i-set ang field na web_search.
Buong inilalarawan ang tool loop sa sarili nitong pahina. Function calling
Ang reply
| Field | Type | Paglalarawan | Ipinadala ng |
|---|---|---|---|
id | string | msg_ na sinusundan ng 32 hexadecimal na character. | Lahat ng model |
type | string | Palaging message. | Lahat ng model |
role | string | Palaging assistant. | Lahat ng model |
model | string | Ang canonical id ng model na sumagot. | Lahat ng model |
content | array | Ang mga block ng reply, sa ganitong pagkakasunod: thinking kapag nag-reason ang model, text, saka isang tool_use kada tool call. | Lahat ng model |
stop_reason | string | Kung bakit natapos ang reply. Tingnan ang mga value sa ibaba. | Lahat ng model |
usage | object | input_tokens at output_tokens. | Lahat ng model |
sources | array | Sa request lang na may web_search: true na may nakitang resulta ang search: ang mga resultang ibinigay sa model, bawat isa ay may index, title at url. Ang [1] sa sagot ay ang entry na may index na 1. Sa isang stream, kasama ito ng event na message_delta. | shannon-1.6-*, shannon-2-*, pamilyang Shannon 3 |
usage.cache_read_input_tokens | integer | Ang cache_read_input_tokens ay ang bahagi ng prompt na binasa mula sa cache; ang input_tokens ay ang natitira. Ang cache_creation_input_tokens ay palaging 0. | Mga hosted open-weight model |
Mga block ng reply
| Block | Paglalarawan |
|---|---|
{"type": "thinking", "thinking": "…"} | Ang reasoning ng model. Walang miyembrong signature. |
{"type": "text", "text": "…"} | Ang text ng sagot. Maaari itong walang laman kapag tool call ang reply. |
{"type": "tool_use", "id": "toolu_…", "name": "…", "input": {…}} | Isang tool call. Ang input ay isang JSON object. Ipadala pabalik ang resulta gamit ang parehong id. |
stop_reason
| stop_reason | Paglalarawan | Ipinadala ng |
|---|---|---|
end_turn | Natapos ng model ang sagot nito, o lumabas ang isa sa iyong stop_sequences. | Lahat ng model |
tool_use | May isa o higit pang tool call ang reply. | Lahat ng model |
max_tokens | Naputol ang reply sa output limit. | Pamilyang Shannon 3, shannon-1.6-lite, shannon-1.6-pro, shannon-coder-1, sa mga stream |
Streaming
I-set ang stream sa true para sa server-sent events. Ang bawat frame ay may event: line na may pangalan ng event at data: line na may JSON object na inuulit ang pangalan sa type. Binabasa ng mga stream helper ng Anthropic SDK ang mga event na ito para sa iyo:
import anthropic
client = anthropic.Anthropic(
api_key="YOUR_API_KEY",
base_url="https://api.shannon-ai.com",
)
with client.messages.stream(
model="shannon-3",
max_tokens=1024,
messages=[{"role": "user", "content": "Explain server-sent events in three sentences."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
message = stream.get_final_message()
print()
print(message.stop_reason, message.usage) import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.shannon-ai.com",
});
const stream = client.messages.stream({
model: "shannon-3",
max_tokens: 1024,
messages: [{ role: "user", content: "Explain server-sent events in three sentences." }],
});
stream.on("text", (text) => process.stdout.write(text));
const message = await stream.finalMessage();
console.log("\n", message.stop_reason, message.usage); curl -N https://api.shannon-ai.com/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "shannon-3",
"max_tokens": 1024,
"stream": true,
"messages": [{"role": "user", "content": "Explain server-sent events in three sentences."}]
}' Ang mga event, ayon sa pagkakasunod ng pagdating:
| Event | Data | Kailan |
|---|---|---|
message_start | message | Palaging una. Laman ng message ang id, ang role, ang model, isang walang lamang content at isang usage na nagsisimula sa zero. |
content_block_start | index, content_block | Nagbubukas ang isang block. Ang content_block ay isang walang lamang text o thinking block, o isang tool_use block na may id at name nito. |
content_block_delta | index, delta {"type": "thinking_delta", "thinking"} | Isang piraso ng reasoning, para sa isang thinking block. |
content_block_delta | index, delta {"type": "text_delta", "text"} | Isang piraso ng sagot, para sa isang text block. |
content_block_delta | index, delta {"type": "input_json_delta", "partial_json"} | Ang mga argument ng isang tool call, kumpleto sa isang delta, para sa isang tool_use block. |
content_block_stop | index | Kumpleto na ang block na may ganitong index. |
message_delta | delta {stop_reason, stop_sequence}, usage | Ang pagtatapos ng reply: delta.stop_reason, at ang usage ng request. |
message_stop | Palaging huli. |
Binibilang ang mga block ayon sa index sa pagkakasunod ng pagbubukas ng mga ito, at kumpleto na ang isang block bago magbukas ang susunod. Basahin ang bawat block ayon sa type nito, hindi sa numero nito: maaaring magbukas muna ang isang stream ng walang lamang text block, saka ang thinking block, at ihatid ang sagot sa isang susunod na text block.
event: message_start
data: {"type":"message_start","message":{"id":"msg_5f0c…","type":"message","role":"assistant","model":"shannon-3","content":[],"usage":{"input_tokens":0,"output_tokens":0}}}
event: content_block_start
data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
event: content_block_stop
data: {"type":"content_block_stop","index":0}
event: content_block_start
data: {"type":"content_block_start","index":1,"content_block":{"type":"thinking","thinking":""}}
event: content_block_delta
data: {"type":"content_block_delta","index":1,"delta":{"type":"thinking_delta","thinking":"Three sentences: what it is, how it is framed, why it is used."}}
event: ping
data: {"type": "ping"}
event: content_block_stop
data: {"type":"content_block_stop","index":1}
event: content_block_start
data: {"type":"content_block_start","index":2,"content_block":{"type":"text","text":""}}
event: content_block_delta
data: {"type":"content_block_delta","index":2,"delta":{"type":"text_delta","text":"Server-sent events let a server push text over one HTTP reply."}}
event: content_block_stop
data: {"type":"content_block_stop","index":2}
event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":1190,"output_tokens":84}}
event: message_stop
data: {"type":"message_stop"} Keep-alive
| Ipinadala ng | Paglalarawan |
|---|---|
Pamilyang Shannon 3, shannon-1.6-lite, shannon-1.6-pro, shannon-coder-1 | Isang ping event na may data na {"type": "ping"}, bawat 15 segundo. |
| Mga hosted open-weight model | Isang comment line na : keepalive, bawat 15 segundo habang gumagana ang model. |
Isang stream na nabibigo
Ang pagkabigo pagkatapos magsimula ang stream ay isang error event na may parehong body ng error reply: {"type": "error", "error": {"type", "message"}}. Sumusunod pa rin ang mga pangwakas na event, message_delta at message_stop. ituring na nabigo ang reply at ipadala muli ang request.
Mga error
Ginagamit ng mga error ang Anthropic error body: ang type ay error, at ang error object ay may type at message. Inililista ng talahanayan ang pinakamadalas na ibinabalik ng endpoint na ito. May sariling pahina ang buong listahan, kasama kung ano ang dapat i-retry. Paghawak ng Error
{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "unknown model: no-such-model"
}
} | Status | Type | Mensahe | Kailan |
|---|---|---|---|
401 | authentication_error | Missing authenticationInvalid API key | Walang API key na naipadala, o hindi kilala o na-revoke ang key. |
400 | invalid_request_error | unknown model: <id> | Hindi Shannon model id ang model. |
400 | invalid_request_error | No user message provided | Mga Shannon tier: walang user text at walang tools ang request. |
400 | invalid_request_error | <id> does not accept image input | Nagpadala ng image sa isang hosted open-weight model na walang image input. |
422 | invalid_request_error | Failed to deserialize the JSON body into the target type: … | Kulang ang messages, o mali ang JSON type ng isang field. |
429 | rate_limit_error | Quota exceeded. Upgrade your plan at shannon-ai.com/plan | Mas malaki ang max_tokens kaysa sa natitira sa iyong balance. |
429 | rate_limit_error | Too many requests. Retry in <n>s. | Flood protection: higit sa 120 request sa loob ng isang minuto sa iyong account. |
429 | rate_limit_error | Shannon Coder call quota reached. Upgrade your plan at shannon-ai.com/plan | shannon-coder-1: nagamit na ang Shannon Coder calls ng iyong plan para sa kasalukuyang 4-hour window. |
500 | server_error | The model backend failed to answer. Please retry. | Hindi nakabuo ng reply ang model. Ipadala muli ang request. |
502 | api_error | The model backend failed to answer. Please retry. | Hindi nakabuo ng reply ang model. Ipadala muli ang request. |
Pagbibilang ng tokens
Ang POST /v1/messages/count_tokens ay tumatanggap ng parehong body ng isang message request (model, system, messages, tools) at nagbabalik ng {"input_tokens": n}: ang bilang ng input tokens na sisingilin sa request. Gumagana ito para sa mga hosted open-weight model, libre ito at hindi ito binibilang ng flood protection.
import anthropic
client = anthropic.Anthropic(
api_key="YOUR_API_KEY",
base_url="https://api.shannon-ai.com",
)
count = client.messages.count_tokens(
model="DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
system="You are a physics teacher. Answer in two sentences.",
messages=[{"role": "user", "content": "Why is the sky blue?"}],
)
print(count.input_tokens) import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.shannon-ai.com",
});
const count = await client.messages.countTokens({
model: "DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
system: "You are a physics teacher. Answer in two sentences.",
messages: [{ role: "user", content: "Why is the sky blue?" }],
});
console.log(count.input_tokens); curl https://api.shannon-ai.com/v1/messages/count_tokens \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"model": "DeepSeek-V4-Flash-0731-W4A16-AUTOROUND-REAP",
"system": "You are a physics teacher. Answer in two sentences.",
"messages": [{"role": "user", "content": "Why is the sky blue?"}]
}'
# {"input_tokens": 31} May sariling pahina ang pagbibilang, kasama ang plain-text endpoint at ang mga limitasyon. Pagbibilang ng token