Tương thích OpenAI — giữ nguyên SDK bạn đang dùng
https://api.orcarouter.ai/v1https://api.orcarouter.aifrom openai import OpenAI
client = OpenAI(
base_url="https://api.orcarouter.ai/v1",
api_key="$ORCAROUTER_API_KEY",
)
response = client.chat.completions.create(
model="google/gemini-flash-latest",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)max_tokensresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_pinclude_reasoningreasoning| Đầu vào / 1M tokens | $0.500 |
| Đầu ra / 1M tokens | $3.00 |
| Đọc cache / 1M | $0.100 |
| Tiền tệ | USD |
Ước tính theo giá niêm yết
Chỉ là ước tính — số token thực tế phụ thuộc vào bộ tách token của nhà cung cấp.
GET /api/public/models/google/gemini-flash-latestMở @misc{orcarouter_gemini_flash_latest,
title = {google/gemini-flash-latest API},
author = {google},
year = {n.d.},
howpublished = {OrcaRouter},
url = {https://www.orcarouter.ai/models/google/gemini-flash-latest}
}google. (n.d.). google/gemini-flash-latest API. OrcaRouter. https://www.orcarouter.ai/models/google/gemini-flash-latest