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

# AI/ML API

> 了解如何使用 Agno 操作 AI/ML API。

AI/ML API 是一个提供统一接口的平台，支持 300+ 个 AI 模型，包括 **Deepseek**、**Gemini**、**ChatGPT** 等，并提供生产级别的正常运行时间和高额请求限制。

## 认证

设置您的 `AIMLAPI_API_KEY` 环境变量。在 [aimlapi.com](https://aimlapi.com/?utm_source=agno\&utm_medium=github\&utm_campaign=integration) 获取您的密钥。

<CodeGroup>
  ```bash Mac theme={null}
  export AIMLAPI_API_KEY=***
  ```

  ```bash Windows theme={null}
  setx AIMLAPI_API_KEY ***
  ```
</CodeGroup>

## 示例

将 `AI/ML API` 用于您的 `Agent`：

<CodeGroup>
  ```python agent.py theme={null}
  from agno.agent import Agent
  from agno.models.aimlapi import AIMLApi

  agent = Agent(
      model=AIMLApi(id="meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo"),
      markdown=True,
  )

  agent.print_response("Explain how black holes are formed.")
  ```
</CodeGroup>

## 参数

<Snippet file="model-aimlapi-params.mdx" />

在适用情况下，`AIMLApi` 还支持 [OpenAI](/reference/models/openai) 的参数。
