| Input | $1.9 per million tokens $2 per million tokens |
| Cached writes (5m) | $0.3562 per million tokens $0.375 per million tokens |
| Cached writes (1 hour) | $4.275 per million tokens $4.50 per million tokens |
| Cached reads | $0.19 per million tokens $0.2 per million tokens |
| Output | $11.4 per million tokens $12 per million tokens |
| Request the length each time | Input | Cached writes (5m) | Cached writes (1 hour) | Cached reads | Selling price |
|---|---|---|---|---|---|
| 0 < tokens <= 204,800 | $2 | $0.375 | $4.5 | $0.2 | $12 |
| 204,800 < tokens <= 1,048,576 | $4 | $0.375 | $4.5 | $0.4 | $18 |
Use the following code example to integrate our API:
1from openai import OpenAI
2
3client = OpenAI(
4 api_key="<Your API Key>",
5 base_url="https://api.jiekou.ai/openai"
6)
7
8response = client.chat.completions.create(
9 model="gemini-3.1-pro-preview",
10 messages=[
11 {"role": "system", "content": "You are a helpful assistant."},
12 {"role": "user", "content": "Hello, how are you?"}
13 ],
14 max_tokens=65536,
15 temperature=0.7
16)
17
18print(response.choices[0].message.content)