Anthropic ์ ๊ณต
Anthropic Claude Sonnet 5.5; text and image input, text output, 1M-token context and up to 128K output tokens. Adaptive thinking is always on, and tool use and explicit cache_control prompt caching are supported. Served over the Anthropic Messages format.
1M
ํ ํฐ 1,000,000๊ฐ
128K
ํ ํฐ 128,000๊ฐ
$2
100๋ง ํ ํฐ๋น
$10
100๋ง ํ ํฐ๋น
curl "https://router-api.0g.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "claude-sonnet-5.5",
"messages": [
{"role": "user", "content": "Hello!"}
],
"stream": true
}'์ ๊ณต์ ๋ผ์ฐํ
X-0G-Provider-* ์์ฒญ ํค๋๋ฅผ ์ฌ์ฉํ์ฌ ์์ฒญ์ ์ฒ๋ฆฌํ ์ ๊ณต์๋ฅผ ์ ์ดํฉ๋๋ค.
X-0G-Provider-Address๋ ์ ๊ณต์๋ฅผ ๊ณ ์ ํ๊ณ , X-0G-Provider-Identity๋ ํด๋น ์ ๊ณต์์ ์
์คํธ๋ฆผ ์ค ์ด๋ ๊ฒ์ ํตํด ๋ผ์ฐํ
ํ ์ง ๊ณ ์ ํฉ๋๋ค. ๋ ๊ฐ ๋ชจ๋ GET /v1/providers์ address ๋ฐ provider_identity ํ๋์์ ๊ฐ์ ธ์ต๋๋ค. ์ด ๋์ ํจ๊ป ์ฌ์ฉํ๋ฉด ํน์ ์ ๊ณต์์ ํน์ ์
์คํธ๋ฆผ ํ๋๋ฅผ ์ง์ ํฉ๋๋ค. ๋ ๋ค ๋ณด๋ด์ง ์์ผ๋ฉด ๋ผ์ฐํฐ๋ ์ด์ ๊ณผ ๋๊ฐ์ด ๊ฐ๊ฒฉ๊ณผ ์ํ์ ๋ฐ๋ผ ์ ํํฉ๋๋ค.
curl "https://router-api.0g.ai/v1/chat/completions" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-H "X-0G-Provider-Address: <PROVIDER_ADDRESS>" \
-H "X-0G-Provider-Identity: <UPSTREAM>" \
-H "X-0G-Provider-Sort: latency" \
-H "X-0G-Provider-Allow-Fallbacks: true" \
-d '{
"model": "claude-sonnet-5.5",
"messages": [{"role": "user", "content": "Hello!"}]
}'