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 (Fireworks SDK)
- Python (OpenAI SDK)
- JavaScript
- curl
Install the Fireworks Python SDK:Then make your first Serverless API call:
The SDK is currently in alpha. Use the
--pre flag when installing to get the latest version."¡Hola!"
Common use cases
Streaming responses
Stream responses token-by-token for a better user experience:- Python (Fireworks SDK)
- Python (OpenAI SDK)
- JavaScript
- curl
Function calling
Connect your models to external tools and APIs:- Python (Fireworks SDK)
- Python (OpenAI SDK)
- JavaScript
- curl
Structured outputs (JSON mode)
Get reliable JSON responses that match your schema:- Python (Fireworks SDK)
- Python (OpenAI SDK)
- JavaScript
- curl
Vision models
Analyze images with vision-language models:- Python (Fireworks SDK)
- Python (OpenAI SDK)
- JavaScript
- curl
Serverless model lifecycle
Serverless models are managed by the Fireworks team and may be updated or deprecated as new models are released. We provide at least 2 weeks advance notice before removing any model, with longer notice periods for popular models based on usage. For production workloads requiring long-term model stability, we recommend using on-demand deployments, which give you full control over model versions and updates.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