Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Python SDKs - 19 providers checked

Official Python SDKs for AI APIs

15 of 19 AI API providers ship an official Python SDK: OpenAI, Anthropic, Google, Mistral AI, Cohere, xAI, Groq, Together AI, OpenRouter, Amazon Bedrock, Hugging Face, Ollama, Z.ai, Alibaba Cloud Model Studio and Cerebras. Fireworks AI also ships one but labels it beta. 3 providers point to the OpenAI SDK instead.

Verified against each provider's own SDK docs and package registry pages. Status labels are the provider's own; no version numbers are recorded.

Compare every language in the provider by language grid.

Official
15
Beta
1
OpenAI SDK
3
Community
0
Official
the provider's own SDK.
Beta
the provider's own SDK, which it labels beta (Fireworks AI says alpha).
OpenAI SDK
the provider's docs point to the OpenAI SDK for this language.
Community
a library the provider's docs link but do not ship. Not official.
None
the provider's SDK docs list no SDK for this language.
-
Not recorded: no entry in the data for this language.

Official SDKs16

Providers that ship their own Python SDK, including those they label beta.

Google

Official SDK
Package
google-genai
Install
Install
pip install google-genai
Repo
github.com/googleapis/python-genai
Docs
ai.google.dev/gemini-api/docs/libraries
Notes
Vertex page install: pip install --upgrade google-genai

From the docs

When building with the Gemini API, we recommend using the Google GenAI SDK. These are the official, production-ready libraries that we develop and maintain for the most popular languages.
ai.google.dev/gemini-api/docs/librariesdocs.cloud.google.com/gemini-enterprise-agent-platform/models/sdks/overview
All Google SDKs

Fireworks AI

Official, labelled beta

Fireworks AI labels this SDK alpha; it is recorded here as beta. Fireworks also says its API works with the OpenAI SDK.

Package
fireworks-ai
Install
Install
pip install --pre fireworks-ai
Repo
github.com/fw-ai-external/python-sdk
Docs
docs.fireworks.ai/tools-sdks/python-sdk
Notes
Official but labelled alpha (recorded as beta). Docs also say: 'Fireworks is OpenAI-compatible, so you can use the OpenAI SDK with Fireworks.'

From the docs

The official Python SDK for the Fireworks AI API is available on GitHub and PyPI. ... The SDK is currently in alpha. Use the --pre flag when installing to get the latest version.
docs.fireworks.ai/tools-sdks/python-sdk
All Fireworks AI SDKs

OpenRouter

Official SDK
Package
openrouter
Install
Install
pip install openrouter
Repo
github.com/OpenRouterTeam/python-sdk
Docs
openrouter.ai/docs/client-sdks/overview
Notes
Repo URL from PyPI metadata ('Official Python Client SDK for OpenRouter.').

From the docs

The Client SDKs give you a thin, type-safe layer over the OpenRouter REST API. ... | TypeScript | @openrouter/sdk | Python | openrouter | Go | go-sdk | ... All three SDKs are auto-generated from the OpenRouter OpenAPI spec
openrouter.ai/docs/client-sdks/overviewpypi.org/project/openrouter
All OpenRouter SDKs

Amazon Bedrock

Official SDK
Package
boto3 (client: boto3.client("bedrock-runtime"))
Install
Install
python -m pip install boto3
Repo
github.com/boto/boto3
Docs
docs.aws.amazon.com/sdk-for-python
Notes
Install line from the boto3 README on PyPI. Bedrock Runtime is a client inside boto3, not a separate package.

From the docs

AWS software development kits (SDKs) are available for many popular programming languages. Each SDK provides an API, code examples, and documentation that make it easier for developers to build applications in their preferred language.
docs.aws.amazon.com/bedrock/latest/userguide/sdk-general-information-section.htmlpypi.org/project/boto3
All Amazon Bedrock SDKs

Hugging Face

Official SDK
Package
huggingface_hub (InferenceClient)
Install
Install
pip install huggingface_hub
Repo
github.com/huggingface/huggingface_hub
Docs
huggingface.co/docs/huggingface_hub/guides/inference

From the docs

For convenience, the huggingface_hub library provides an InferenceClient that automatically handles provider selection and request routing. ... When using the Hugging Face inference clients (JavaScript or Python), you can explicitly specify a provider or let the system choose automatically.
huggingface.co/docs/inference-providers/index
All Hugging Face SDKs

Alibaba Cloud Model Studio

Official SDK
Package
dashscope
Install
Install
pip install -U dashscope
Docs
www.alibabacloud.com/help/en/model-studio/install-sdk
Notes
No repo linked; PyPI lists homepage https://dashscope.aliyun.com/ and author Alibaba Cloud. The OpenAI Python SDK is the documented alternative (pip install -U openai).

From the docs

Model Studio provides official DashScope SDKs (Python, Java) and supports OpenAI SDKs (Python, Node.js, Java, Go) for OpenAI-compatible API calls. ... You can call models on Model Studio using the DashScope Python SDK (recommended) or the OpenAI Python SDK.
www.alibabacloud.com/help/en/model-studio/install-sdkpypi.org/project/dashscope
All Alibaba Cloud Model Studio SDKs

Use the OpenAI SDK3

For Python, these providers' docs point to the OpenAI SDK rather than a library of their own.

DeepSeek

Points to the OpenAI SDK

Not a DeepSeek SDK. For Python, DeepSeek's docs point you to the OpenAI SDK. Base URL and limits.

Package
openai
Install
Install
pip3 install openai
Repo
github.com/openai/openai-python
Docs
api-docs.deepseek.com

From the docs

The DeepSeek API uses an API format compatible with OpenAI/Anthropic. By modifying the configuration, you can use the OpenAI/Anthropic SDK or softwares compatible with the OpenAI/Anthropic API to access the DeepSeek API. ... # Please install OpenAI SDK first: `pip3 install openai`
api-docs.deepseek.com
All DeepSeek SDKs

Azure OpenAI / Microsoft Foundry

Points to the OpenAI SDK

Not a Azure OpenAI / Microsoft Foundry SDK. For Python, Azure OpenAI / Microsoft Foundry's docs point you to the OpenAI SDK. Base URL and limits.

Package
openai (+ azure-identity)
Install
Install
pip install openai azure-identity
Repo
github.com/openai/openai-python
Docs
learn.microsoft.com/en-us/azure/foundry/openai/supported-languages

From the docs

Use the OpenAI SDKs with the Azure OpenAI v1 endpoint to build model inference applications in Python, C#, JavaScript, Java, or Go.
learn.microsoft.com/en-us/azure/foundry/openai/supported-languages
All Azure OpenAI / Microsoft Foundry SDKs

Other languages

9 more language pages, plus the full SDK reference.

Newsletter

Know when a provider ships a new SDK

One email per week. New models, new SDKs and the API changes that break your client, and what they mean for your stack.