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

# OpenAI 图片 API 文档

> 查看 TTAPI 提供的 OpenAI 图片 API 文档，包含图片生成、图片编辑、GPT-4o 生图和结果获取等能力。

# OpenAI 图片 API

这里是 TTAPI 的 **OpenAI 图片 API** 总览页，你可以在这里快速了解 OpenAI 图片相关能力，并进入具体接口文档。

## OpenAI 图片 API 可以做什么

* 通过 [OpenAI Images Generations API](/api/cn/openai/images-generations) 生成图片
* 通过 [OpenAI Images Edits API](/api/cn/openai/images-edits) 编辑图片
* 通过 [4o Image Generations API](/api/cn/openai/4o-image-generations) 使用 GPT-4o 生图
* 通过 [4o Image Fetch API](/api/cn/openai/4o-image-fetch) 获取结果

## 常用 OpenAI 图片 API 接口

| 使用场景      | 接口                                                                 |
| :-------- | :----------------------------------------------------------------- |
| 图片生成      | [OpenAI Images Generations API](/api/cn/openai/images-generations) |
| 图片编辑      | [OpenAI Images Edits API](/api/cn/openai/images-edits)             |
| GPT-4o 生图 | [4o Image Generations API](/api/cn/openai/4o-image-generations)    |
| 图片结果获取    | [4o Image Fetch API](/api/cn/openai/4o-image-fetch)                |

## 推荐接入流程

1. 先调用 [图片生成](/api/cn/openai/images-generations) 或 [图片编辑](/api/cn/openai/images-edits)。
2. 如果你基于 GPT-4o 图片模型，调用 [4o Image Generations API](/api/cn/openai/4o-image-generations)。
3. 如果任务需要异步查询，调用 [4o Image Fetch API](/api/cn/openai/4o-image-fetch)。

## 为什么用 TTAPI 接入 OpenAI 图片 API

* 用统一网关接入 OpenAI 图片能力
* 鉴权和计费流程更统一
