Step 1: Create and export an API key
Before you begin, create an API key in the Fireworks dashboard. Click Create API key and store it in a safe location. Once you have your API key, export it as an environment variable in your terminal:- macOS / Linux
- Windows
Step 2: Make your first Serverless API call
- Python
- JavaScript
- curl
Fireworks provides an OpenAI compatible endpoint. Install the OpenAI Python SDK:Then make your first Serverless API call:
"¡Hola!"
Common use cases
Streaming responses
Stream responses token-by-token for a better user experience:- Python
- JavaScript
- curl
Function calling
Connect your models to external tools and APIs:- Python
- JavaScript
- curl
Structured outputs (JSON mode)
Get reliable JSON responses that match your schema:- Python
- JavaScript
- curl
Vision models
Analyze images with vision-language models:- Python
- JavaScript
- curl
Next steps
Ready to scale to production, explore other modalities, or customize your models?Deploy and autoscale on Dedicated GPUs
Deploy with high performance on dedicated GPUs with fast autoscaling and minimal cold starts
Fine-tune Models
Improve model quality with supervised and reinforcement learning
Speech to Text
Real-time or batch audio transcription
Embeddings & Reranking
Use embeddings & reranking in search & context retrieval
Batch Inference
Run async inference jobs at scale, faster and cheaper
Browse 100+ Models
Explore all available models across modalities
API Reference
Complete API documentation