Last refreshed 2026-04-24. Next refresh: weekly.
Why use StarCoder2 15B on DeepInfra?
DeepInfra offers StarCoder2 15B with pay-as-you-go pricing at $0.20/1M input tokens. DeepInfra is a cloud inference platform offering cost-effective access to open-source AI models.
Compare StarCoder2 15B across 3 providers to find the best fit for your use caseSetup recipe
Python + curlpip install openaiexport DEEPINFRA_API_KEY=...import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPINFRA_API_KEY"],starcoder2-15bRequest example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPINFRA_API_KEY"],
base_url="https://api.deepinfra.com/v1/openai"
)
response = client.chat.completions.create(
model="starcoder2-15b",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Gotchas
- DeepInfra uses "organization/model-name" format, e.g. "meta-llama/Meta-Llama-3-8B-Instruct" or "mistralai/Mistral-7B-Instruct-v0.3". See the DeepInfra model catalog for exact IDs.
- The examples expect DEEPINFRA_API_KEY; rename it only if your application config maps the new variable.
Compare StarCoder2 15B Across Providers
| Provider | Input (per 1M) | Output (per 1M) |
|---|---|---|
| Fireworks AI | $0.20 | $0.20 |
| DeepInfra | $0.20 | $0.60 |
| NVIDIA NIM | — | — |
Pricing
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.20 |
| Output tokens | $0.60 |
Capabilities
About StarCoder2 15B
StarCoder2-15B is a sophisticated large language model, expertly crafted for code generation and understanding. Developed by the BigCode project, it features 15 billion parameters and is trained on The Stack v2, a vast dataset of over 4 trillion tokens from more than 600 programming languages. Its advanced transformer decoder architecture, equipped with a grouped-query and sliding window attention mechanism and a Fill-in-the-Middle training objective, allows a context window of 16,384 tokens. In addition to generating and completing code, the model excels in tasks like code summarization and retrieving relevant snippets through natural language queries. The training leveraged NVIDIA's NeMo framework and the Eos Supercomputer, while usage is governed by the BigCode Open RAIL-M license, supporting royalty-free and commercial use.
FAQ
What does StarCoder2 15B cost on DeepInfra?
On DeepInfra, StarCoder2 15B costs $0.20 per 1M input tokens and $0.60 per 1M output tokens.
What is the context window for StarCoder2 15B on DeepInfra?
StarCoder2 15B supports a 8,000 token context window on DeepInfra.
How does DeepInfra compare to other StarCoder2 15B providers?
StarCoder2 15B is available from 3 providers. The cheapest input pricing is $0.20/1M tokens from Fireworks AI.
Who created StarCoder2 15B?
StarCoder2 15B was created by ServiceNow Research as part of the StarCoder 2 model family.
Is StarCoder2 15B open source?
StarCoder2 15B is open source according to the seed data.