skillfed

fireworks-ai

The official Python library for the fireworks API

fireworks-ai v1.2.9 4.4M downloads/30d#2,300 on PyPI10
Permissive license Apache-2.0 Active released

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-ai

uv

uv add fireworks-ai

poetry

poetry add fireworks-ai

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

fireworks api python clientllm inference sdkasync http api wrapperfireworks ai sdkrest api python librarytyped api clientai model api access
llm-inferenceasync-httpapi-client

More Python Modules packages