> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI/ML API integrations

> Integrate with AI/ML API using LangChain Python.

> [AI/ML API](https://aimlapi.com/app/?utm_source=langchain\&utm_medium=github\&utm_campaign=integration) provides a single API for accessing 300+ hosted foundation models (DeepSeek, Gemini, GPT, and more) with enterprise-grade uptime and throughput.

## Installation and setup

* Install the AI/ML API integration package.

  ```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  pip install langchain-aimlapi
  ```

* Create an account at [aimlapi.com](https://aimlapi.com/app/?utm_source=langchain\&utm_medium=github\&utm_campaign=integration) and generate an API key.

* Authenticate by setting the `AIMLAPI_API_KEY` environment variable.

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import os

os.environ["AIMLAPI_API_KEY"] = "aimlapi_..."
```

## Chat models

See a [usage example](https://docs.aimlapi.com/).

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_aimlapi import ChatAIMLAPI
```

## LLMs

See a [usage example](/oss/python/integrations/llms/aimlapi).

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_aimlapi import AIMLAPILLM
```

## Embedding models

See a [usage example](https://docs.aimlapi.com/).

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_aimlapi import AIMLAPIEmbeddings
```

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/providers/aimlapi.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
