fireworks-ai
The official Python library for the fireworks API
What it is and what it does
Fireworks AI is the official Python SDK for accessing Fireworks' REST API, enabling developers to call LLM inference endpoints and manage training jobs from Python applications. It provides both synchronous (httpx-based) and asynchronous (aiohttp-based) clients with full type hints, Pydantic response models, and automatic pagination support. The library handles authentication via API keys, supports streaming responses over Server-Sent Events, and includes convenience methods for common operations like chat completions, batch inference, and dataset management.
The SDK is actively maintained, supports modern Python versions (3.9–3.14), and has low install friction with standard HTTP and async dependencies. It is auto-generated by Stainless for API consistency, with the exception of training-specific code in src/fireworks/training/. Optional training extras are available for GRPO/DPO workflows on Python 3.11+, though training-scoped API keys are required for those features.
Use it for:
- Build chat applications or LLM-powered services by calling Fireworks' hosted models via the chat completions API.
- Stream real-time LLM responses in web applications or CLIs using Server-Sent Events.
- Manage fine-tuning and training jobs (GRPO/DPO) with the optional training SDK on Python 3.11+.
- Automate batch inference workloads by submitting and monitoring batch inference jobs.
- Paginate through large result sets (datasets, jobs, deployments) without manual page handling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for the Fireworks REST API, providing typed synchronous and asynchronous clients to access Fireworks' LLM inference and training services.
Yes. The SDK is actively maintained (released 2 days ago), has low install friction, supports modern Python versions, carries a permissive Apache-2.0 license, and provides a well-typed, production-ready interface to Fireworks' API. No known vulnerabilities. Install it if you need to integrate Fireworks' LLM services into a Python application.
Install
fireworks-ai on PyPI
pip
pip install fireworks-aiuv
uv add fireworks-aipoetry
poetry add fireworks-aiInstalling fireworks-ai
Before you install
Low friction: pure Python wheel with 8 runtime dependencies (aiohttp, httpx, pydantic, and others) all widely maintained. Active maintenance—released 2 days ago with last commit 2026-08-14. Supports Python 3.9 through 3.14.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions. Safe for proprietary projects.
Quickstart
pip install fireworks-ai
import os
from fireworks import Fireworks
client = Fireworks(api_key=os.environ.get("FIREWORKS_API_KEY"))
completion = client.chat.completions.create(
messages=[{"role": "user", "content": "How do LLMs work?"}],
model="accounts/fireworks/models/kimi-k2-instruct-0905",
)
print(completion.choices[0].message.content)
Requires a valid FIREWORKS_API_KEY environment variable or explicit api_key parameter to authenticate with the Fireworks API.
Verify before relying
- Whether the optional [training] extra (for GRPO/DPO) is stable and production-ready on Python 3.11+
- Rate limits and quota behavior for the Fireworks API endpoints
- Performance characteristics of the async client under high concurrency
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — aiohttp, anyio, distro, httpx-aiohttp, httpx, pydantic, sniffio, typing-extensions |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,447,706/month — #2,300 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fireworks_ai-1.2.9-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
mistralaiPython client SDK for the Mistral AI API,…
unclear · top 1,000 on PyPI
sambanovaProvides a Python client library for accessing…
permissive · top 15,000 on PyPI
langchain-fireworksIntegrates Fireworks.ai language models with…
permissive · top 5,000 on PyPI
writer-sdkPython client library for the Writer REST API,…
permissive · top 15,000 on PyPI
perplexityaiProvides a Python client library for the…
permissive · top 5,000 on PyPI
llama-api-clientProvides a typed Python client for the Llama…
permissive · top 15,000 on PyPI
cerebras-cloud-sdkProvides a Python client library for accessing…
permissive · top 5,000 on PyPI
llama-stack-clientPython client library for interacting with…
permissive · top 15,000 on PyPI
hiddenlayer-sdkProvides a typed Python client for the…
permissive · top 15,000 on PyPI
FireWorksFireWorks stores, executes, and manages…
permissive · top 15,000 on PyPI