Using Stable Code 3B on Fireworks AI
Implementation guide · Stable Code · Stability AI
Fireworks AI exposes Stable Code 3B through model ID stable-code-3b. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.
Last refreshed 2026-09-29. Next refresh: weekly.
Quick Start
- 1
- 2Use the Fireworks AI SDK or REST API to call
stable-code-3b— see the documentation for request format. - 3
Code Examples
pip install openaiFIREWORKS_API_KEYstable-code-3bFireworks model IDs use "accounts/fireworks/models/{model-name}" format, e.g. "accounts/fireworks/models/llama4-scout-instruct-basic" or "accounts/fireworks/models/deepseek-r1".
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FIREWORKS_API_KEY"],
base_url="https://api.fireworks.ai/inference/v1"
)
response = client.chat.completions.create(
model="stable-code-3b",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Pricing on Fireworks AI
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.10 |
| Output tokens | $0.10 |
Capabilities
No model capability flags are currently sourced.
About Stable Code 3B
Stable Code 3B, developed by Stability AI, is a 3-billion parameter large language model tailored for code completion. It offers competitive performance comparable to larger models like CodeLLaMA 7b while maintaining a smaller size, enabling it to run efficiently on typical laptops without a dedicated GPU. Beyond code completion, it supports features like "Fill in the Middle" capability and handling contexts up to 16,384 tokens, covering 18 programming languages. Its decoder-only transformer architecture, enhanced with Rotary Position Embeddings, relies on diverse open-source datasets.