Google ์ ๊ณต
Preview build of the reasoning tier of the Google Gemini 3.1 line; text and image input, text output, 1M-token context, function calling supported. Preview: behaviour may change without a new model id.
โ
โ
$2
100๋ง ํ ํฐ๋น
$12
100๋ง ํ ํฐ๋น
curl "https://router-api.0g.ai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "gemini-3.1-pro-preview",
"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": "gemini-3.1-pro-preview",
"messages": [{"role": "user", "content": "Hello!"}]
}'