Loading…
Loading…
Qwen2.5-Coder is the latest series of Code-Specific Qwen large language models (formerly known as CodeQwen). As of now, Qwen2.5-Coder has covered six mainstream model sizes, 0.5, 1.5, 3, 7, 14, 32 billion parameters, to meet the needs of different developers. Qwen2.5-Coder brings the following improvements upon CodeQwen1.5: By Qwen, on GridPup at $0.80 per million input tokens and $1.21 per million output tokens, paid from your GridPup balance per request. No subscription.
| A 1,000-word answer to a 200-word question | $0.0018 |
|---|---|
| 1,000 such answers | $1.82 |
| Summarising a 50-page document (25,000 words) in 500 words | $0.027 |
GridPup's API speaks OpenAI's format: use any OpenAI SDK with the base URL https://api.gridpup.com/v1/ai and a GridPup API key with Also use AI models. The answer tells you what it cost. More in the API docs.
from openai import OpenAI
client = OpenAI(base_url="https://api.gridpup.com/v1/ai", api_key="gp_live_…")
r = client.chat.completions.create(
model="@cf/qwen/qwen2.5-coder-32b-instruct",
messages=[{"role": "user", "content": "Explain a KV cache in two sentences."}],
)
print(r.choices[0].message.content)
print("cost:", r.usage.cost_usd, "USD")base_url to https://api.gridpup.com/v1/ai and the model to @cf/qwen/qwen2.5-coder-32b-instruct.