llama-api-client
The official Python library for the llama-api-client API
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. It provides a well-typed, officially-backed client for Llama API access with both sync and async support. Install it if you need to integrate Llama models into a Python application.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid LLAMA_API_KEY environment variable or explicit api_key parameter to authenticate with the Llama API.
- Low friction install with six common runtime dependencies (anyio, distro, httpx, pydantic, sniffio, typing-extensions).
- The package is actively maintained with recent commits and has been in active development since April 2025.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—only requiring attribution and inclusion of the license text.
last release 2025-12-18 (239 days) · last repo commit 2026-05-12 · 64 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,863 downloads/mo, #11,385 on PyPI
Alternatives
Verify before relying
pip install llama-api-client
import os
from llama_api_client import LlamaAPIClient
client = LlamaAPIClient(
api_key=os.environ.get("LLAMA_API_KEY"),
)
response = client.chat.completions.create(
messages=[{"content": "string", "role": "user"}],
model="model",
)
print(response.completion_message)- Whether the package is officially maintained by Meta or a third-party wrapper around the Llama API.
- Rate limits, quotas, or cost implications of using the Llama API through this client.
- Whether all Llama API endpoints are fully covered or if some are missing.
What it is and what it does
This is an official Python client library for the Llama API, generated using Stainless. It wraps the Llama API REST endpoints with type-safe request and response objects, built on httpx for HTTP transport. The library supports both synchronous and asynchronous usage patterns, with the async client optionally using aiohttp for improved concurrency. It includes full type hints for all request parameters and response fields, enabling IDE autocomplete and static type checking.
The client handles common API patterns: chat completions (including streaming via Server-Side Events), file uploads with multipart support, and structured error handling with automatic retries for transient failures. Responses are Pydantic models with helper methods for JSON serialization and dictionary conversion. The library targets Python 3.9 and later, supporting current and recent Python versions.
Use it for
- Build a chatbot or conversational AI application using Llama models with typed, autocompleted API calls.
- Stream Llama model responses token-by-token for real-time user feedback in web or CLI applications.
- Integrate Llama API calls into async Python services or concurrent batch-processing pipelines.
- Upload fine-tuning datasets to Llama API using the built-in file upload and multipart handling.
- Handle API errors gracefully with automatic retries and specific exception types for different failure modes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. It provides a well-typed, officially-backed client for Llama API access with both sync and async support. Install it if you need to integrate Llama models into a Python application.
Install
llama-api-client on PyPI
Before you install
Low friction install with six common runtime dependencies (anyio, distro, httpx, pydantic, sniffio, typing-extensions). The package is actively maintained with recent commits and has been in active development since April 2025.
Requires a valid LLAMA_API_KEY environment variable or explicit api_key parameter to authenticate with the Llama API.
License in practice
MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—only requiring attribution and inclusion of the license text.
Quickstart
pip install llama-api-client
import os
from llama_api_client import LlamaAPIClient
client = LlamaAPIClient(
api_key=os.environ.get("LLAMA_API_KEY"),
)
response = client.chat.completions.create(
messages=[{"content": "string", "role": "user"}],
model="model",
)
print(response.completion_message)
Verify before relying
- Whether the package is officially maintained by Meta or a third-party wrapper around the Llama API.
- Rate limits, quotas, or cost implications of using the Llama API through this client.
- Whether all Llama API endpoints are fully covered or if some are missing.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesanyiodistrohttpxpydanticsniffiotyping-extensions |
| Maintenance | Actively maintained 239 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,863 / month, #11,385 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT 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 |
Evidence: llama_api_client-0.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “llama api python client”
- llama-api-clientProvides a typed Python client for the Llama API with support for…
- llama-stack-clientPython client library for interacting with Llama Stack REST API,…
- ogx_open_clientProvides an OpenAPI-generated Python client for the OGX API, offering…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also llama-stack-client · sambanova · together · groq · hiddenlayer-sdk · fireworks-ai · cerebras-cloud-sdk · composio-client · writer-sdk · openai