# CC Switch 接入
Source: https://docs.agicto.com/ai-tools/cc-switch
在 CC Switch 中配置 AGICTO API 自定义模型供应商
你可以通过 Claude / Anthropic 兼容接口,在 CC Switch 中接入 AGICTO API。配置完成后,你可以在 Claude Code 中使用 AGICTO API 提供的模型。
## 配置 AGICTO 供应商
在 CC Switch 中进入 `Claude Code` 供应商管理页,点击 **添加供应商**,选择自定义配置。
填写以下内容:
| 字段 | 值 |
| - | - |
| 供应商名称 | `AGICTO` |
| 官网链接 | `https://agicto.com/` |
| API Key | 填写你的 AGICTO API Key |
| 请求地址 | `https://api.agicto.cn` |
Claude Code 供应商的请求地址不要添加 `/v1`,末尾也不要添加 `/`。如果你配置的是 Chat 或 OpenAI 兼容格式,请使用 `https://api.agicto.cn/v1`。
## 高级选项
展开 **高级选项**,保持以下配置:
| 字段 | 值 |
| - | - |
| API 格式 | `Anthropic Messages(原生)` |
| 认证字段 | `ANTHROPIC_AUTH_TOKEN(默认)` |
## 模型映射
将 Claude Code 的模型角色映射到 AGICTO API 模型:
| 模型角色 | 实际请求模型 |
| - | - |
| Sonnet | `claude-opus-4-7` |
| Opus | `claude-opus-4-7` |
| Haiku | `claude-opus-4-7` |
| 默认兜底模型 | `claude-opus-4-7` |
## 配置 JSON 示例
最终配置 JSON 应类似如下:
```json theme={null}
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "你的_AGICTO_API_KEY",
"ANTHROPIC_BASE_URL": "https://api.agicto.cn",
"ANTHROPIC_MODEL": "claude-opus-4-7",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-7",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-opus-4-7",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-opus-4-7"
},
"includeCoAuthoredBy": false
}
```
## 保存并切换
点击右下角 **添加** 保存供应商。
添加成功后,回到供应商列表,将当前 Claude Code 供应商切换为 `AGICTO`。
## 测试
在终端中运行:
```bash theme={null}
claude
```
如果 Claude Code 可以正常回复,说明 AGICTO API 配置成功。
## 常见问题
### 添加时报 `Cannot read properties of undefined (reading 'invoke')`
说明当前打开的是浏览器中的 `localhost:3000` 页面,而不是 CC Switch 的 Tauri 桌面窗口。
请在 CC Switch 桌面应用窗口中操作。
### 报 `invalid_api_key`
API Key 填写错误。请检查是否复制完整,特别注意 `l`、`I`、`1` 等相似字符。
### 报 `model not found`
模型名称填写错误。请确认模型映射中使用:
```text theme={null}
claude-opus-4-7
```
### 连接到 `127.0.0.1:8902` 失败
本机可能配置了代理环境变量,但代理服务没有启动。
可以关闭相关代理环境变量,或启动对应的本地代理服务。
# Claude Code 接入
Source: https://docs.agicto.com/ai-tools/claude-code
在 Claude Code 中使用 AGICTO API
你可以通过环境变量让 Claude Code 请求 AGICTO API。不同版本的 Claude Code 对变量名支持可能不同,请以本地版本提示为准。
## 准备
* 已安装 Claude Code
* 已获取 AGICTO API 的 API Key
* 已确认你的账户有可用余额或额度
## 常用配置
```bash theme={null}
export ANTHROPIC_AUTH_TOKEN="$AGICTO_API_KEY"
export ANTHROPIC_BASE_URL="https://api.agicto.cn"
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"
```
## Windows 全局配置
文件:`C:\Users\用户\.claude\settings.json`
```json theme={null}
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "$AGICTO_API_KEY",
"ANTHROPIC_BASE_URL": "https://api.agicto.cn",
"ANTHROPIC_MODEL": "claude-opus-4-6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.6",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.6",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.6",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
}
}
```
## Windows PowerShell
```powershell theme={null}
setx ANTHROPIC_AUTH_TOKEN "$AGICTO_API_KEY"
setx ANTHROPIC_BASE_URL "https://api.agicto.cn"
setx CLAUDE_CODE_SKIP_COUNTRY_CHECK "1"
setx CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS "1"
```
## VS Code 插件环境变量
```json theme={null}
"claudeCode.environmentVariables": [
{
"name": "ANTHROPIC_BASE_URL",
"value": "https://api.agicto.cn"
},
{
"name": "ANTHROPIC_AUTH_TOKEN",
"value": "$AGICTO_API_KEY"
},
{
"name": "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC",
"value": "1"
},
{
"name": "CLAUDE_CODE_SKIP_COUNTRY_CHECK",
"value": "1"
}
]
```
如果你使用的是 OpenAI 兼容客户端,请把 Base URL 配置为 `https://api.agicto.cn/v1/`。如果你使用 Claude Code 的 Anthropic 变量,通常配置为 `https://api.agicto.cn`。
# Codex 接入
Source: https://docs.agicto.com/ai-tools/codex
在 Codex 客户端和 Codex CLI 中使用 AGICTO API
你可以把 AGICTO API 配置为 Codex 的自定义模型供应商。Codex 客户端和 Codex CLI 都读取本机的 Codex 配置。
## 准备
* 已安装 Codex 客户端或 Codex CLI
* 已获取 AGICTO API 的 API Key
* 已确认你的账户有可用余额或额度
* 已从 模型列表 复制可用模型名
## 配置值
| 字段 | 值 |
| - | - |
| Provider name | `agicto` |
| Base URL | `https://api.agicto.cn/v1` |
| API Key | 你的 AGICTO API Key |
| Wire API | `responses` |
| Model | 你的账户可用模型名 |
Codex 使用 OpenAI 兼容格式时,Base URL 需要包含 `/v1`。
## Codex 客户端
Codex 桌面客户端通过本机配置文件读取自定义供应商。你可以在客户端里打开配置文件,然后写入 AGICTO API 配置。
在 Codex 客户端左侧点击 **配置**。
在 **自定义 config.toml 设置** 区域选择 **用户配置**。
点击 **打开 config.toml**,编辑 `~/.codex/config.toml`。
将 AGICTO API 供应商配置写入 `config.toml`。
客户端按钮不会直接打开 `auth.json`。请在同一个 `~/.codex` 目录中打开或新建 `auth.json`,并写入 AGICTO API Key。
退出并重新打开 Codex 客户端,让客户端重新加载配置。
### config.toml 配置
文件位置:`~/.codex/config.toml`
```toml theme={null}
model_provider = "agicto"
model = "gpt-5.5"
model_reasoning_effort = "medium"
[model_providers.agicto]
name = "AGICTO API"
base_url = "https://api.agicto.cn/v1"
wire_api = "responses"
requires_openai_auth = true
```
将 `model` 替换为你的账户可用模型名。
如果你的 `config.toml` 已经有其他配置,只需要保留原有内容,并补充或修改上面的 `model_provider`、`model` 和 `[model_providers.agicto]`。
### auth.json 配置
文件位置:`~/.codex/auth.json`
点击 **打开 config.toml** 后,编辑器会打开 `~/.codex/config.toml`。`auth.json` 就在同一个 `~/.codex` 目录中。
如果你使用 macOS,可以在终端中打开这个目录:
```bash theme={null}
open ~/.codex
```
然后找到或新建 `auth.json`。
你也可以直接用编辑器打开:
```bash theme={null}
code ~/.codex/auth.json
```
如果你没有安装 VS Code 命令行,也可以用系统自带编辑器打开:
```bash theme={null}
open -e ~/.codex/auth.json
```
写入以下内容:
```json theme={null}
{
"OPENAI_API_KEY": "你的_AGICTO_API_KEY"
}
```
Codex 会用 `OPENAI_API_KEY` 字段作为 OpenAI 兼容供应商的认证 Key。
`auth.json` 会保存真实 API Key。不要把这个文件提交到 Git 仓库,也不要把它发给其他人。
## Codex CLI
Codex CLI 读取同样的 `~/.codex/config.toml` 和 `~/.codex/auth.json`。
### 设置 API Key
在终端中设置环境变量:
```bash theme={null}
export AGICTO_API_KEY="你的_AGICTO_API_KEY"
export OPENAI_API_KEY="$AGICTO_API_KEY"
```
你也可以用 Codex CLI 把 API Key 写入 `~/.codex/auth.json`:
```bash theme={null}
printenv AGICTO_API_KEY | codex login --with-api-key
```
如果你手动编辑了 `auth.json`,可以跳过这条登录命令。
如果你希望每次打开终端自动生效,可以把上面的内容加入 `~/.zshrc`、`~/.bashrc` 或你的 shell 配置文件。
不要把真实 API Key 提交到 Git 仓库。只在本机环境变量或本机私有配置中保存它。
### 写入 config.toml
编辑 `~/.codex/config.toml`,加入以下配置:
```toml theme={null}
model_provider = "agicto"
model = "gpt-5.5"
model_reasoning_effort = "medium"
[model_providers.agicto]
name = "AGICTO API"
base_url = "https://api.agicto.cn/v1"
wire_api = "responses"
requires_openai_auth = true
```
将 `model` 替换为你的账户可用模型名。
### 启动 CLI
在项目目录中运行:
```bash theme={null}
codex
```
你也可以临时指定模型:
```bash theme={null}
codex -m gpt-5.5
```
或直接发起一次非交互式请求:
```bash theme={null}
codex exec "用一句话介绍当前项目"
```
## 一次性命令
如果你不想立即修改配置文件,可以用 `-c` 临时覆盖配置:
```bash theme={null}
OPENAI_API_KEY="$AGICTO_API_KEY" codex \
-c model_provider='"agicto"' \
-c model='"gpt-5.5"' \
-c model_providers.agicto.name='"AGICTO API"' \
-c model_providers.agicto.base_url='"https://api.agicto.cn/v1"' \
-c model_providers.agicto.wire_api='"responses"' \
-c model_providers.agicto.requires_openai_auth=true
```
## 验证
先确认 Codex CLI 可以读取配置:
```bash theme={null}
codex doctor
```
然后发起一次简单请求:
```bash theme={null}
codex exec "只回复 ok"
```
如果返回 `ok`,说明 Codex 已通过 AGICTO API 完成调用。
## 常见问题
### 报 `No Codex credentials were found`
Codex 没有读到 API Key。请确认当前终端中已经设置:
```bash theme={null}
echo "$OPENAI_API_KEY"
```
如果没有输出,请重新执行:
```bash theme={null}
export OPENAI_API_KEY="$AGICTO_API_KEY"
```
### 报 `model not found`
模型名称不可用或拼写错误。请从 模型列表 复制完整模型名,并更新 `model`。
### 报 `wire_api = "chat" is no longer supported`
当前 Codex CLI 需要使用 Responses API。请确认供应商配置中包含:
```toml theme={null}
wire_api = "responses"
```
### 连接失败或超时
请先用 `curl` 验证 AGICTO API Key 和网络:
```bash theme={null}
curl https://api.agicto.cn/v1/models \
-H "Authorization: Bearer $AGICTO_API_KEY"
```
如果 `curl` 可以返回模型列表,但 Codex 失败,请检查 Base URL 是否为 `https://api.agicto.cn/v1`,并确认终端中 `OPENAI_API_KEY` 已设置。
# Cursor 接入
Source: https://docs.agicto.com/ai-tools/cursor
在 Cursor 中使用 AGICTO API
你可以在 Cursor 中配置 AGICTO API,用 OpenAI 兼容格式调用模型。
## 准备
* 已安装 Cursor
* 已开通 Cursor Pro。Cursor 免费版不支持切换自定义模型
* 已从 AGICTO 控制台 复制 API Key。`sk-` 开头的是 API Key
* 已从 模型广场 复制可用模型名
* 已确认你的账户有可用余额或额度
## 配置方式
在 Cursor 中打开 **Settings**,进入模型或 API Provider 配置区域。
确认当前账号可使用 Cursor Pro。免费版不能切换自定义模型。
从 AGICTO 控制台复制 Base URL,填入 `https://api.agicto.cn/v1`。不要在末尾添加 `/`。
从 AGICTO 控制台复制 API Key,填入 OpenAI API Key 字段。`sk-` 开头的是 API Key。
从模型广场复制模型名,在前面加 `cursor-`,例如 `cursor-MODEL_NAME`。点击 **Add** 保存模型。
回到对话框,在模型下拉菜单中选择刚配置的 `cursor-` 模型。不要选择 **Auto**。
## 配置值
| 字段 | 值 |
| - | - |
| Base URL | `https://api.agicto.cn/v1` |
| API Key | 你的 AGICTO API Key |
| Model / Model ID | `cursor-MODEL_NAME` |
| 格式 | OpenAI 兼容格式 |
Cursor 免费版不支持切换自定义模型。你需要使用 Cursor Pro,并在对话框中手动选择已配置的 `cursor-` 模型。
# Trae 接入
Source: https://docs.agicto.com/ai-tools/trae
在 Trae 中使用 AGICTO API
你可以在 Trae 中配置 OpenAI 兼容格式,让 AI 编程助手通过 AGICTO API 调用模型。
## 准备
* 已安装 Trae
* 已获取 AGICTO API 的 API Key
* 已确认你的账户有可用余额或额度
* 已从 模型广场 复制可用模型名称
## 配置值
| 字段 | 值 |
| - | - |
| Provider | `OpenAI Compatible` 或自定义 OpenAI Provider |
| Base URL | `https://api.agicto.cn/v1` |
| API Key | 你的 AGICTO API Key |
| Model ID | 从模型广场复制的模型名称 |
| 格式 | OpenAI 兼容格式 |
## 复制 AGICTO 配置
打开 模型广场,复制你要使用的模型名称。
打开 API Keys 页面,复制页面上的 Base URL。
在同一个 API Keys 页面复制你的 API Key。
## 配置步骤
在 Trae 中打开 **Settings**,进入 AI、Model 或 Provider 配置区域。
选择 **OpenAI Compatible**、**Custom OpenAI** 或支持 Base URL 的自定义 Provider。
API 格式选择 **OpenAI Chat Completions 格式**。
自定义请求地址填从 AGICTO 复制的 Base URL,例如 `https://api.agicto.cn/v1`。
API 密钥填从 AGICTO 复制的 API Key。
模型 ID 填从模型广场复制的模型名称。
点击 **添加模型**,然后在 Trae 对话框的模型列表中选择这个自定义模型。
发送一个简单任务,例如让 Trae 解释当前文件或生成一个小函数。
Base URL 使用 `https://api.agicto.cn/v1`,结尾不要加斜杠。若从 API Keys 页面复制的地址以 `/` 结尾,请删除末尾的斜杠。
## 排查
### 对话不回复
如果 Trae 发送消息后一直没有回复,你可以先重新配置一次模型。
回到 Trae 的模型配置页,删除当前自定义模型,按本页步骤重新添加。
打开 API Keys 页面,确认 API Key 仍处于启用状态。
API Key 通常以 `sk-` 开头。复制时不要漏掉 `sk-`,也不要复制到空格、换行或多余字符。
从 模型广场 重新复制模型名称,填入 Trae 的模型 ID。
保存配置后,重新打开 Trae 对话窗口,再发送一条简单消息验证。
| 问题 | 处理方式 |
| - | - |
| 对话不回复 | 重新配置模型,检查 API Key 是否失效,并确认 Key 以 `sk-` 开头。 |
| 提示认证失败 | 检查 API Key 是否完整,是否包含多余空格。 |
| 提示模型不存在 | 从 模型广场 重新复制模型名称。 |
| 请求路径错误 | 确认 Base URL 是 `https://api.agicto.cn/v1`,不是官网地址。 |
| 工具调用失败 | 换用支持工具调用的模型,并重新发起任务。 |
Trae 会读取或修改本地项目文件。请在可信项目中使用,并确认模型输出后再接受代码改动。
# Windsurf 接入
Source: https://docs.agicto.com/ai-tools/windsurf
在 Windsurf 中使用 AGICTO API
你可以在 Windsurf 中配置 OpenAI 兼容 Provider,让 Cascade 使用 AGICTO API。
## 准备
* 已安装 Windsurf
* 已获取 AGICTO API 的 API Key
* 已确认你的账户有可用余额或额度
## 配置方式
进入 **Settings**,找到模型 Provider 或自定义 API 配置。
添加 OpenAI-compatible Provider。
Base URL 填 `https://api.agicto.cn/v1`,API Key 填你的 AGICTO API Key。
填写可用模型名,发送一条测试消息。
## 配置值
| 字段 | 值 |
| - | - |
| Base URL | `https://api.agicto.cn/v1` |
| API Key | 你的 AGICTO API Key |
| 格式 | OpenAI 兼容格式 |
# 账户余额查询
Source: https://docs.agicto.com/api-reference/account/balance
POST /v1/enterprise/account
## Endpoint
```http theme={null}
POST /v1/enterprise/account
```
**分组**: 账户
## Request example
```json theme={null}
{
"uuid": ""
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/enterprise/account:
post:
summary: 账户余额查询
deprecated: false
description: ''
tags:
- 账户
parameters: []
requestBody:
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
title: 账户uuid
required:
- uuid
x-apifox-orders:
- uuid
example:
uuid: ''
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
title: 状态码,0成功,非0失败
message:
type: string
title: 响应提示
data:
type: object
properties:
account:
type: string
title: 账户余额
required:
- account
x-apifox-orders:
- account
required:
- code
- message
- data
x-apifox-orders:
- code
- message
- data
example:
code: 0
message: 请求成功
data:
account: '4.9974451'
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 账户
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-233067517-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 千问tts
Source: https://docs.agicto.com/api-reference/audio/qwen-tts
POST /v1/qwen/tts
## Endpoint
```http theme={null}
POST /v1/qwen/tts
```
**分组**: 语音合成
## Headers
* `Authorization`: 可选 示例: `Bearer xxx`
## Request example
```json theme={null}
"{\r\n \"model\": \"qwen-tts\",\r\n \"input\": {\r\n \"text\": \"那我来给大家推荐一款T恤,这款呢真的是超级好看,这个颜色呢很显气质,而且呢也是搭配的绝佳单品,大家可以闭眼入,真的是非常好看,对身材的包容性也很好,不管啥身材的宝宝呢,穿上去都是很好看的。推荐宝宝们下单哦。\",\r\n \"voice\": \"Chelsie\", //支持音色Cherry、Serena、Ethan、Chelsie、Dylan、Jada、Sunny\r\n }\r\n}"
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/qwen/tts:
post:
summary: 千问tts
deprecated: false
description: ''
tags:
- 语音合成
parameters:
- name: Authorization
in: header
description: ''
required: false
example: Bearer xxx
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
example: "{\r\n \"model\": \"qwen-tts\",\r\n \"input\": {\r\n \"text\": \"那我来给大家推荐一款T恤,这款呢真的是超级好看,这个颜色呢很显气质,而且呢也是搭配的绝佳单品,大家可以闭眼入,真的是非常好看,对身材的包容性也很好,不管啥身材的宝宝呢,穿上去都是很好看的。推荐宝宝们下单哦。\",\r\n \"voice\": \"Chelsie\", //支持音色Cherry、Serena、Ethan、Chelsie、Dylan、Jada、Sunny\r\n }\r\n}"
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
output:
type: object
properties:
finish_reason:
type: string
audio:
type: object
properties:
expires_at:
type: integer
data:
type: string
id:
type: string
url:
type: string
required:
- expires_at
- data
- id
- url
x-apifox-orders:
- expires_at
- data
- id
- url
required:
- finish_reason
- audio
x-apifox-orders:
- finish_reason
- audio
usage:
type: object
properties:
input_tokens_details:
type: object
properties:
text_tokens:
type: integer
required:
- text_tokens
x-apifox-orders:
- text_tokens
total_tokens:
type: integer
output_tokens:
type: integer
input_tokens:
type: integer
output_tokens_details:
type: object
properties:
audio_tokens:
type: integer
text_tokens:
type: integer
required:
- audio_tokens
- text_tokens
x-apifox-orders:
- audio_tokens
- text_tokens
required:
- input_tokens_details
- total_tokens
- output_tokens
- input_tokens
- output_tokens_details
x-apifox-orders:
- input_tokens_details
- total_tokens
- output_tokens
- input_tokens
- output_tokens_details
request_id:
type: string
required:
- output
- usage
- request_id
x-apifox-orders:
- output
- usage
- request_id
example:
output:
finish_reason: stop
audio:
expires_at: 1745053690
data: ''
id: audio_1028b3b5-5320-9a75-b3fb-f0bcba2a390d
url: >-
http://dashscope-result-wlcb.oss-cn-wulanchabu.aliyuncs.com/1d/8b/20250418/2413932e/af45d651-f632-4c4a-91d5-59077447adcc.wav?Expires=1745053690&OSSAccessKeyId=xxx&Signature=wntwl%xxx%3D
usage:
input_tokens_details:
text_tokens: 76
total_tokens: 1158
output_tokens: 1082
input_tokens: 76
output_tokens_details:
audio_tokens: 1082
text_tokens: 0
request_id: 1028b3b5-5320-9a75-b3fb-f0bcba2a390d
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 语音合成
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-330568601-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 豆包图片生成
Source: https://docs.agicto.com/api-reference/images/doubao/generate
POST /v1/images/generations
豆包系图片生成文档:[https://www.volcengine.com/docs/82379/1541523?lang=zh](https://www.volcengine.com/docs/82379/1541523?lang=zh)
## Endpoint
```http theme={null}
POST /v1/images/generations
```
**分组**: 图片
## Headers
* `Authorization`: 必填 示例: `Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: 豆包图片生成
deprecated: false
description: 豆包系图片生成文档:https://www.volcengine.com/docs/82379/1541523?lang=zh
tags:
- 图片
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
description: >-
模型doubao-seedream-5-0-260128、doubao-seedream-4-5-251128、doubao-seedream-4-0-250828
其他参数可参考官方文档:
type: string
required:
- model
- 其他参数可参考官方文档
x-apifox-orders:
- model
- 其他参数可参考官方文档
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-395146159-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 谷歌生图nano banana
Source: https://docs.agicto.com/api-reference/images/google/nano-banana
POST /v1/images/generations
官方文档:[https://ai.google.dev/gemini-api/docs/image-generation?hl=zh-cn](https://ai.google.dev/gemini-api/docs/image-generation?hl=zh-cn)
## Endpoint
```http theme={null}
POST /v1/images/generations
```
**分组**: 图片
## Headers
* `Authorization`: 可选 示例: `Bearer xxx`
## Request example
```json theme={null}
"{\r\n \"model\": \"gemini-2.5-flash-image-preview\",\r\n \"contents\": [\r\n {\r\n \"role\": \"user\",\r\n \"parts\": [\r\n {\r\n \"text\": \"'Hi, This is a picture of me. Can you add a llama next to me\"\r\n },\r\n {\r\n \"inline_data\": {\r\n \"mime_type\": \"image/png\",\r\n \"data\": \"iVBORw++dr59PZ9=\" //图片base64\r\n }\r\n },\r\n {\r\n \"inline_data\": {\r\n \"mime_type\": \"image/png\",\r\n \"data\": \"iVBORw++dr59PZ9=\" //图片base64\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"generationConfig\": {\r\n \"responseModalities\": [\r\n \"TEXT\",\r\n \"IMAGE\"\r\n ],\r\n \"imageConfig\": {\r\n \"aspectRatio\": \"1:1\",\r\n \"imageSize\": \"1K\"\r\n }\r\n }\r\n}"
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: 谷歌生图nano banana
deprecated: false
description: 官方文档:https://ai.google.dev/gemini-api/docs/image-generation?hl=zh-cn
tags:
- 图片
parameters:
- name: Authorization
in: header
description: ''
required: false
example: Bearer xxx
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
contents:
type: array
items:
type: object
properties:
role:
type: string
parts:
type: array
items:
type: object
properties:
text:
type: string
inline_data:
type: object
properties:
mime_type:
type: string
data:
description: 图片base64
type: string
required:
- mime_type
- data
x-apifox-orders:
- mime_type
- data
required:
- inline_data
x-apifox-orders:
- text
- inline_data
x-apifox-orders:
- role
- parts
generationConfig:
type: object
properties:
responseModalities:
type: array
items:
type: string
description: '["TEXT", "IMAGE"]'
imageConfig:
type: object
properties:
aspectRatio:
type: string
description: 比例,1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9、21:9
imageSize:
type: string
description: 分辨率,1K、2K、4K
x-apifox-orders:
- aspectRatio
- imageSize
required:
- aspectRatio
- imageSize
description: 分辨率、比例设置
required:
- responseModalities
- imageConfig
x-apifox-orders:
- responseModalities
- imageConfig
description: 图片配置
required:
- model
- contents
- generationConfig
x-apifox-orders:
- model
- contents
- generationConfig
example: "{\r\n \"model\": \"gemini-2.5-flash-image-preview\",\r\n \"contents\": [\r\n {\r\n \"role\": \"user\",\r\n \"parts\": [\r\n {\r\n \"text\": \"'Hi, This is a picture of me. Can you add a llama next to me\"\r\n },\r\n {\r\n \"inline_data\": {\r\n \"mime_type\": \"image/png\",\r\n \"data\": \"iVBORw++dr59PZ9=\" //图片base64\r\n }\r\n },\r\n {\r\n \"inline_data\": {\r\n \"mime_type\": \"image/png\",\r\n \"data\": \"iVBORw++dr59PZ9=\" //图片base64\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n \"generationConfig\": {\r\n \"responseModalities\": [\r\n \"TEXT\",\r\n \"IMAGE\"\r\n ],\r\n \"imageConfig\": {\r\n \"aspectRatio\": \"1:1\",\r\n \"imageSize\": \"1K\"\r\n }\r\n }\r\n}"
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-344307289-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 图片操作(Action)
Source: https://docs.agicto.com/api-reference/images/midjourney/action
POST /v1/mj/submit/action
## Endpoint
```http theme={null}
POST /v1/mj/submit/action
```
**分组**: 图片 / midjourney
## Headers
* `Authorization`: 必填 示例: `Bearer $API_KEY`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"taskId": "1321323323232"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/mj/submit/action:
post:
summary: 图片操作(Action)
deprecated: false
description: ''
tags:
- 图片/midjourney
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
customId:
type: string
description: >-
示例值:
MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011,进度接口会返回
taskId:
type: string
description: 任务id
required:
- customId
- taskId
x-apifox-orders:
- customId
- taskId
example:
customId: MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011
taskId: '1321323323232'
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description:
type: string
properties:
type: object
properties: {}
x-apifox-orders: []
result:
type: integer
description: 任务id
required:
- code
- description
- properties
- result
x-apifox-orders:
- code
- description
- properties
- result
description: '状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误) 示例值: 1'
example:
code: 1
description: 提交成功
properties: {}
result: 1320098173412546
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片/midjourney
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282830115-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 图片进度查询
Source: https://docs.agicto.com/api-reference/images/midjourney/fetch
GET /mj/task/{result}/fetch
## Endpoint
```http theme={null}
GET /mj/task/{result}/fetch
```
**分组**: 图片 / midjourney
## Headers
* `Authorization`: 可选 示例: `Bearer $API_KEY`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/mj/task/{result}/fetch:
get:
summary: 图片进度查询
deprecated: false
description: ''
tags:
- 图片/midjourney
parameters:
- name: result
in: path
description: 任务id
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: Bearer $API_KEY
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
action:
type: string
description: 任务类型
description:
type: string
description: 任务描述
failReason:
type: string
description: |
失败原因
finishTime:
type: integer
description: 结束时间
id:
type: string
description: 任务id
imageUrl:
type: string
description: 图片url
progress:
type: string
description: 任务进度
prompt:
type: string
description: 提示词
promptEn:
type: string
description: |
提示词-英文
properties:
type: object
properties: {}
x-apifox-orders: []
startTime:
type: integer
status:
type: string
description: '枚举值: NOT_START SUBMITTED IN_PROGRESS FAILURE SUCCESS'
submitTime:
type: integer
required:
- action
- description
- failReason
- finishTime
- id
- imageUrl
- progress
- prompt
- promptEn
- properties
- startTime
- status
- submitTime
x-apifox-orders:
- action
- description
- failReason
- finishTime
- id
- imageUrl
- progress
- prompt
- promptEn
- properties
- startTime
- status
- submitTime
example:
action: IMAGINE
description: string
failReason: string
finishTime: 0
id: string
imageUrl: string
progress: string
prompt: string
promptEn: string
properties: {}
startTime: 0
state: string
status: NOT_START
submitTime: 0
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片/midjourney
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282830896-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 图片生成(Imagine)
Source: https://docs.agicto.com/api-reference/images/midjourney/imagine
POST /v1/mj/submit/imagine
文生图,文图生图
## Endpoint
```http theme={null}
POST /v1/mj/submit/imagine
```
**分组**: 图片 / midjourney
## Headers
* `Content-Type`: 必填 示例: `application/json`
* `Authorization`: 可选 示例: `Bearer $API_KEY`
## Request example
```json theme={null}
{
"botType": "MID_JOURNEY",
"prompt": "Cat",
"base64Array": [
],
"accountFilter": {
"channelId": "",
"instanceId": "",
"modes": [
],
"remark": "",
"remix": true,
"remixAutoConsidered": true
},
"notifyHook": "",
"state": ""
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/mj/submit/imagine:
post:
summary: 图片生成(Imagine)
deprecated: false
description: 文生图,文图生图
tags:
- 图片/midjourney
parameters:
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: Bearer $API_KEY
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
botType:
type: string
description: >-
bot类型,mj(默认)或niji,可用值:MID_JOURNEY,NIJI_JOURNEY,示例值(MID_JOURNEY)
prompt:
type: string
description: 提示词
base64Array:
type: array
items:
type: string
description: 垫图base64数组(可以在上面的prompt里面 使用图片url+prompt的形式达到图文生图的效果)
model:
type: string
description: mj-fast或mj-relax,默认mj-fast
required:
- botType
- prompt
- base64Array
- model
x-apifox-orders:
- model
- botType
- prompt
- base64Array
example:
botType: MID_JOURNEY
prompt: Cat
base64Array: []
accountFilter:
channelId: ''
instanceId: ''
modes: []
remark: ''
remix: true
remixAutoConsidered: true
notifyHook: ''
state: ''
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
description: '状态码: 1(提交成功), 22(排队中), other(错误)'
description:
type: string
description: 描述
properties:
type: object
properties: {}
x-apifox-orders: []
description: 扩展字段
result:
description: 任务id
type: integer
required:
- code
- description
- properties
- result
x-apifox-orders:
- code
- description
- properties
- result
example:
code: 1
description: 提交成功
properties: {}
result: 12463258
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片/midjourney
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282827563-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# GPT图片编辑
Source: https://docs.agicto.com/api-reference/images/openai/edit
POST /v1/images/generations
GPT图片编辑文档:[https://developers.openai.com/api/reference/resources/images/methods/edit](https://developers.openai.com/api/reference/resources/images/methods/edit)
## Endpoint
```http theme={null}
POST /v1/images/generations
```
**分组**: 图片 / openai
## Headers
* `Authorization`: 必填 示例: `Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: GPT图片编辑
deprecated: false
description: >-
GPT图片编辑文档:https://developers.openai.com/api/reference/resources/images/methods/edit
tags:
- 图片/openai
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
example: ''
type: string
prompt:
example: ''
type: string
image[]:
format: binary
type: string
example: ''
background:
description: '"transparent" or "opaque" or "auto"'
example: ''
type: string
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片/openai
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-420617922-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# GPT图片生成
Source: https://docs.agicto.com/api-reference/images/openai/generate
POST /v1/images/generations
GPT图片生成文档:[https://developers.openai.com/api/reference/resources/images/methods/generate](https://developers.openai.com/api/reference/resources/images/methods/generate)
豆包系图片生成文档:[https://www.volcengine.com/docs/82379/1541523?lang=zh](https://www.volcengine.com/docs/82379/1541523?lang=zh)
## Endpoint
```http theme={null}
POST /v1/images/generations
```
**分组**: 图片 / openai
## Headers
* `Authorization`: 必填 示例: `Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"model": "gpt-image-1",
"prompt": "Programmer cartoon avatar",
"size": "1024x1024"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: GPT图片生成
deprecated: false
description: >-
GPT图片生成文档:https://developers.openai.com/api/reference/resources/images/methods/generate
豆包系图片生成文档:https://www.volcengine.com/docs/82379/1541523?lang=zh
tags:
- 图片/openai
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-FQCysi51wHAAjUPW8i9JOfX4GA6GoExqj1BvHSPzVwSsdfbg
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
description: >-
模型gpt-image-1、doubao-seedream-4-0-250828、doubao-seedream-4-5-251128
prompt:
type: string
required:
- model
- prompt
x-apifox-orders:
- model
- prompt
example:
model: gpt-image-1
prompt: Programmer cartoon avatar
size: 1024x1024
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片/openai
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386885375-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 千问文生图
Source: https://docs.agicto.com/api-reference/images/qwen/text-to-image
POST /v1/images/generations
官方文档:[https://bailian.console.aliyun.com/cn-beijing/?spm=5176.12818093\_47.console-base\_search-panel.dtab-product\_sfm.3be916d08ZgBq6\&scm=20140722.S\_sfm.\_.ID\_sfm-RL\_%E6%A8%A1%E5%9E%8B-LOC\_console\_console-OR\_ser-V\_4-P0\_1\&tab=api#/api/?type=model\&url=2976416](https://bailian.console.aliyun.com/cn-beijing/?spm=5176.12818093_47.console-base_search-panel.dtab-product_sfm.3be916d08ZgBq6\&scm=20140722.S_sfm._.ID_sfm-RL_%E6%A8%A1%E5%9E%8B-LOC_console_console-OR_ser-V_4-P0_1\&tab=api#/api/?type=model\&url=2976416)
## Endpoint
```http theme={null}
POST /v1/images/generations
```
**分组**: 图片
## Headers
* `Authorization`: 可选 示例: `Bearer xxx`
## Request example
```json theme={null}
"{\r\n \"model\": \"qwen-image-plus\", //支持模型qwen-image-plus、qwen-image-max、qwen-image-2.0、qwen-image-2.0-pro\r\n \"input\": {\r\n \"prompt\": \"一间有着精致窗户的花店,漂亮的木质门,摆放着花朵\", //正向提示词,支持中英文,长度不超过800个字符,每个汉字/字母占一个字符,超过部分会自动截断\r\n \"negative_prompt\": \"\" //反向提示词,用来描述不希望在画面中看到的内容,可以对画面进行限制\r\n },\r\n \"parameters\": {\r\n \"size\": \"1024*1024\", //图片规格,图像宽高边长的像素范围为:[512, 1440]\r\n \"n\": 1 //图片数量,1-4.默认1\r\n }\r\n}"
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: 千问文生图
deprecated: false
description: >-
官方文档:https://bailian.console.aliyun.com/cn-beijing/?spm=5176.12818093_47.console-base_search-panel.dtab-product_sfm.3be916d08ZgBq6&scm=20140722.S_sfm._.ID_sfm-RL_%E6%A8%A1%E5%9E%8B-LOC_console_console-OR_ser-V_4-P0_1&tab=api#/api/?type=model&url=2976416
tags:
- 图片
parameters:
- name: Authorization
in: header
description: ''
required: false
example: Bearer xxx
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
example: "{\r\n \"model\": \"qwen-image-plus\", //支持模型qwen-image-plus、qwen-image-max、qwen-image-2.0、qwen-image-2.0-pro\r\n \"input\": {\r\n \"prompt\": \"一间有着精致窗户的花店,漂亮的木质门,摆放着花朵\", //正向提示词,支持中英文,长度不超过800个字符,每个汉字/字母占一个字符,超过部分会自动截断\r\n \"negative_prompt\": \"\" //反向提示词,用来描述不希望在画面中看到的内容,可以对画面进行限制\r\n },\r\n \"parameters\": {\r\n \"size\": \"1024*1024\", //图片规格,图像宽高边长的像素范围为:[512, 1440]\r\n \"n\": 1 //图片数量,1-4.默认1\r\n }\r\n}"
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
request_id:
type: string
output:
type: object
properties:
task_id:
type: string
task_status:
type: string
submit_time:
type: string
scheduled_time:
type: string
end_time:
type: string
results:
type: array
items:
type: object
properties:
orig_prompt:
type: string
actual_prompt:
type: string
url:
type: string
x-apifox-orders:
- orig_prompt
- actual_prompt
- url
task_metrics:
type: object
properties:
TOTAL:
type: integer
SUCCEEDED:
type: integer
FAILED:
type: integer
required:
- TOTAL
- SUCCEEDED
- FAILED
x-apifox-orders:
- TOTAL
- SUCCEEDED
- FAILED
required:
- task_id
- task_status
- submit_time
- scheduled_time
- end_time
- results
- task_metrics
x-apifox-orders:
- task_id
- task_status
- submit_time
- scheduled_time
- end_time
- results
- task_metrics
usage:
type: object
properties:
image_count:
type: integer
required:
- image_count
x-apifox-orders:
- image_count
required:
- request_id
- output
- usage
x-apifox-orders:
- request_id
- output
- usage
example:
request_id: f767d108-7d50-908b-a6d9-xxxxxx
output:
task_id: d492bffd-10b5-4169-b639-xxxxxx
task_status: SUCCEEDED
submit_time: '2025-01-08 16:03:59.840'
scheduled_time: '2025-01-08 16:03:59.863'
end_time: '2025-01-08 16:04:10.660'
results:
- orig_prompt: 一间有着精致窗户的花店,漂亮的木质门,摆放着花朵
actual_prompt: >-
一间有着精致雕花窗户的花店,漂亮的深色木质门上挂着铜制把手。店内摆放着各式各样的鲜花,包括玫瑰、百合和向日葵,色彩鲜艳,生机勃勃。背景是温馨的室内场景,透过窗户可以看到街道。高清写实摄影,中景构图。
url: >-
https://dashscope-result-wlcb.oss-cn-wulanchabu.aliyuncs.com/1.png
task_metrics:
TOTAL: 1
SUCCEEDED: 1
FAILED: 0
usage:
image_count: 1
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 图片
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-330569734-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# API reference
Source: https://docs.agicto.com/api-reference/introduction
从 Apifox 同步的 AGICTO API 接口总览
这里收录从 Apifox 同步的 AGICTO API 文档。每个接口页面都包含请求地址、Header、示例请求和原始 OpenAPI 片段。
部分接口在 Apifox 中共用同一个 method 和 path,但请求体表示不同模型或供应商的变体。对应页面会保留各自的原始 OpenAPI 片段。
## Base URL
```text theme={null}
https://api.agicto.cn/v1/
```
## Authentication
```http theme={null}
Authorization: Bearer $API_KEY
```
## 接口分组
聊天、嵌入、图片和排序模型。
OpenAI 图片格式、Midjourney、Qwen、Google 和豆包图片接口。
OpenAI 兼容视频格式和官方视频格式。
联网搜索、热榜、视频解析、发票查验和发票 OCR。
## 使用建议
* 第一次调用先读 快速开始。
* 迁移已有 OpenAI SDK 项目先读 OpenAI 兼容格式。
* 视频任务先读 视频任务流程。
* 接口报错先读 故障排查。
# chat-image
Source: https://docs.agicto.com/api-reference/model/chat/image
POST /v1/chat/completions
## Endpoint
```http theme={null}
POST /v1/chat/completions
```
**分组**: 模型调用 / 会话(chat)
## Headers
* `Content-Type`: 必填 示例: `application/json`
* `Authorization`: 必填 示例: `Bearer $API_KEY`
## Request example
```json theme={null}
{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 300
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/chat/completions:
post:
summary: chat-image
deprecated: false
description: ''
tags:
- 模型调用/会话(chat)
parameters:
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
messages:
type: array
items:
type: object
properties:
role:
type: string
content:
type: array
items:
type: object
properties:
type:
type: string
text:
type: string
image_url:
type: object
properties:
url:
type: string
required:
- url
required:
- type
max_tokens:
type: integer
required:
- model
- messages
- max_tokens
example:
model: gpt-4o
messages:
- role: user
content:
- type: text
text: What is in this image?
- type: image_url
image_url:
url: >-
https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg
max_tokens: 300
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/会话(chat)
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282438731-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# chat-message
Source: https://docs.agicto.com/api-reference/model/chat/message
POST /v1/chat/completions
官方文档地址:[https://platform.openai.com/docs/api-reference/chat/create](https://platform.openai.com/docs/api-reference/chat/create)
## Endpoint
```http theme={null}
POST /v1/chat/completions
```
**分组**: 模型调用 / 会话(chat)
## Headers
* `Content-Type`: 必填 示例: `application/json`
* `Authorization`: 必填 示例: `Bearer $API_KEY`
## Request example
```json theme={null}
{
"model": "gpt-4o",
"messages": [
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/chat/completions:
post:
summary: chat-message
deprecated: false
description: 官方文档地址:https://platform.openai.com/docs/api-reference/chat/create
tags:
- 模型调用/会话(chat)
parameters:
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
messages:
type: array
items:
type: object
properties:
role:
type: string
content:
type: string
required:
- role
- content
required:
- model
- messages
example:
model: gpt-4o
messages:
- role: developer
content: You are a helpful assistant.
- role: user
content: Hello!
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/会话(chat)
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282435670-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# chat-video
Source: https://docs.agicto.com/api-reference/model/chat/video
POST /v1/chat/completions
## Endpoint
```http theme={null}
POST /v1/chat/completions
```
**分组**: 模型调用 / 会话(chat)
## Headers
* `Content-Type`: 必填 示例: `application/json`
* `Authorization`: 必填 示例: `Bearer $API_KEY`
## Request example
```json theme={null}
{
"model": "gemini-2.5-pro",
"stream": false,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Please summarize the video in 3 sentences"
},
{
"type": "image_url",
"image_url": {
"url": "视频链接"
}
}
]
}
]
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/chat/completions:
post:
summary: chat-video
deprecated: false
description: ''
tags:
- 模型调用/会话(chat)
parameters:
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
messages:
type: array
items:
type: object
properties:
role:
type: string
content:
type: array
items:
type: object
properties:
type:
type: string
text:
type: string
image_url:
type: object
properties:
url:
type: string
required:
- url
required:
- type
max_tokens:
type: integer
required:
- model
- messages
- max_tokens
example:
model: gemini-2.5-pro
stream: false
messages:
- role: user
content:
- type: text
text: Please summarize the video in 3 sentences
- type: image_url
image_url:
url: 视频链接
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/会话(chat)
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-416281135-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 创建嵌入
Source: https://docs.agicto.com/api-reference/model/embeddings/create
POST /v1/embeddings
官方文档见:[https://platform.openai.com/docs/api-reference/embeddings/create](https://platform.openai.com/docs/api-reference/embeddings/create)
## Endpoint
```http theme={null}
POST /v1/embeddings
```
**分组**: 模型调用 / 嵌入(embedding)
## Headers
* `Authorization`: 必填 示例: `Bearer $API_KEY`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"input": "The food was delicious and the waiter...",
"model": "text-embedding-ada-002",
"encoding_format": "float"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/embeddings:
post:
summary: 创建嵌入
deprecated: false
description: 官方文档见:https://platform.openai.com/docs/api-reference/embeddings/create
tags:
- 模型调用/嵌入(embedding)
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
input:
anyOf:
- type: string
- type: array
items:
type: string
model:
type: string
encoding_format:
type: string
required:
- model
- encoding_format
x-apifox-orders:
- input
- model
- encoding_format
example:
input: The food was delicious and the waiter...
model: text-embedding-ada-002
encoding_format: float
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/嵌入(embedding)
x-apifox-status: developing
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282444769-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 生成图片
Source: https://docs.agicto.com/api-reference/model/images/generate
POST /v1/images/generations
官方文档见:[https://platform.openai.com/docs/api-reference/images](https://platform.openai.com/docs/api-reference/images)
## Endpoint
```http theme={null}
POST /v1/images/generations
```
**分组**: 模型调用 / 图像(dall)
## Headers
* `Content-Type`: 必填 示例: `application/json`
* `Authorization`: 必填 示例: `Bearer $API_KEY`
## Request example
```json theme={null}
{
"model": "dall-e-3",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: 生成图片
deprecated: false
description: 官方文档见:https://platform.openai.com/docs/api-reference/images
tags:
- 模型调用/图像(dall)
parameters:
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
description: 用于图像生成的模型
prompt:
type: string
description: 所需图像的文本描述。最大长度为 1000 个字符
'n':
type: integer
description: 要生成的图像数。必须介于 1 和 10 之间。
size:
type: string
description: 生成图像的大小。必须是256x256、512x512或 1024x1024之一。
quality:
type: string
description: 将生成的图像的质量。hd创建具有更精细细节和更高一致性的图像。此参数仅支持dall-e-3
style:
type: string
description: vivid or natural,仅支持dall-3
required:
- model
- prompt
- 'n'
- size
- quality
- style
x-apifox-orders:
- model
- prompt
- 'n'
- size
- quality
- style
example:
model: dall-e-3
prompt: A cute baby sea otter
'n': 1
size: 1024x1024
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/图像(dall)
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282450855-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 排序模型
Source: https://docs.agicto.com/api-reference/model/rerank
POST /v1/rerank
## Endpoint
```http theme={null}
POST /v1/rerank
```
**分组**: 模型调用 / 排序模型
## Headers
* `Authorization`: 必填 示例: `Bearer $API_KEY`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"model": "rerank-v3.5",
"query": "排序模型是什么",
"top_n": 3,
"documents": [
"文本排序模型广泛用于搜索引擎和推荐系统中,它们根据文本相关性对候选文本进行排序",
"量子计算是计算科学的一个前沿领域",
"预训练语言模型的发展给文本排序模型带来了新的进展"
]
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/rerank:
post:
summary: 排序模型
deprecated: false
description: ''
tags:
- 模型调用/排序模型
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
description: 模型
query:
type: string
description: 需匹配内容
top_n:
type: integer
description: >-
排序返回的top文档数量,未指定时默认返回全部候选文档,如果指定的top_n值大于输入的候选document数量,返回全部候选文档
documents:
type: array
items:
type: string
description: 待排序的候选document列表
required:
- model
- query
- top_n
- documents
x-apifox-orders:
- model
- query
- top_n
- documents
example:
model: rerank-v3.5
query: 排序模型是什么
top_n: 3
documents:
- 文本排序模型广泛用于搜索引擎和推荐系统中,它们根据文本相关性对候选文本进行排序
- 量子计算是计算科学的一个前沿领域
- 预训练语言模型的发展给文本排序模型带来了新的进展
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: object
properties:
index:
type: integer
description: 本结构中的算法结果对应的document在输入候选documents数组中的位置索引值
relevance_score:
type: number
description: 相似度分数取值0.0-1.0之间(浮点型)
required:
- index
- relevance_score
x-apifox-orders:
- index
- relevance_score
description: 请求的算法输出内容,是一个结构化的数组。每一个数组中包含一个对应的输入text的算法输出内容
usage:
type: object
properties:
total_tokens:
type: integer
required:
- total_tokens
x-apifox-orders:
- total_tokens
required:
- results
- usage
x-apifox-orders:
- results
- usage
example:
results:
- index: 0
relevance_score: 0.72042775
- index: 1
relevance_score: 0.60077465
usage:
total_tokens: 0
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/排序模型
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282831591-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 提交视频任务
Source: https://docs.agicto.com/api-reference/official-video/doubao/create
POST /v1/videos/create/doubao
参数参考官方文档:[https://www.volcengine.com/docs/82379/1520757?lang=zh](https://www.volcengine.com/docs/82379/1520757?lang=zh)
## Endpoint
```http theme={null}
POST /v1/videos/create/doubao
```
**分组**: 官方视频格式 / 豆包
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/create/doubao:
post:
summary: 提交视频任务
deprecated: false
description: 参数参考官方文档:https://www.volcengine.com/docs/82379/1520757?lang=zh
tags:
- 官方视频格式/豆包
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: >-
模型名称Doubao-Seedance-1.0-pro/doubao-seedance-1-0-pro-250528、Doubao-Seedance-1.0-pro-fast/doubao-seedance-1-0-pro-fast-251015、Doubao-Seedance-1-5-pro/doubao-seedance-1-5-pro-251215
example: ''
type: string
required:
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/豆包
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386656974-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/official-video/doubao/retrieve
GET /v1/videos/status/doubao/{id}
参数参考官方文档:[https://www.volcengine.com/docs/82379/1521309?lang=zh](https://www.volcengine.com/docs/82379/1521309?lang=zh)
## Endpoint
```http theme={null}
GET /v1/videos/status/doubao/{id}
```
**分组**: 官方视频格式 / 豆包
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/status/doubao/{id}:
get:
summary: 查询视频详情
deprecated: false
description: 参数参考官方文档:https://www.volcengine.com/docs/82379/1521309?lang=zh
tags:
- 官方视频格式/豆包
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
status:
type: string
progress:
type: integer
video_url:
type: string
created_at:
type: integer
required:
- id
- object
- status
- progress
- video_url
- created_at
x-apifox-orders:
- id
- object
- status
- progress
- video_url
- created_at
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
status: completed
progress: 100
video_url: ''
created_at: 1764849891
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/豆包
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386656975-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 提交视频任务
Source: https://docs.agicto.com/api-reference/official-video/hailuo/create
POST /v1/videos/create/hailuo
官方文档:[https://platform.minimaxi.com/docs/api-reference/video-generation-t2v](https://platform.minimaxi.com/docs/api-reference/video-generation-t2v)
## Endpoint
```http theme={null}
POST /v1/videos/create/hailuo
```
**分组**: 官方视频格式 / 海螺
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/create/hailuo:
post:
summary: 提交视频任务
deprecated: false
description: >-
官方文档:https://platform.minimaxi.com/docs/api-reference/video-generation-t2v
tags:
- 官方视频格式/海螺
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: >-
模型名称MiniMax-Hailuo-2.3、MiniMax-Hailuo-2.3-Fast、MiniMax-Hailuo-02
example: ''
type: string
required:
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/海螺
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386675855-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/official-video/hailuo/retrieve
GET /v1/videos/status/hailuo/{id}
官方文档:[https://platform.minimaxi.com/docs/api-reference/video-generation-t2v](https://platform.minimaxi.com/docs/api-reference/video-generation-t2v)
## Endpoint
```http theme={null}
GET /v1/videos/status/hailuo/{id}
```
**分组**: 官方视频格式 / 海螺
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/status/hailuo/{id}:
get:
summary: 查询视频详情
deprecated: false
description: >-
官方文档:https://platform.minimaxi.com/docs/api-reference/video-generation-t2v
tags:
- 官方视频格式/海螺
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
status:
type: string
progress:
type: integer
video_url:
type: string
created_at:
type: integer
required:
- id
- object
- status
- progress
- video_url
- created_at
x-apifox-orders:
- id
- object
- status
- progress
- video_url
- created_at
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
status: completed
progress: 100
video_url: ''
created_at: 1764849891
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/海螺
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386675856-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 创建图生视频任务
Source: https://docs.agicto.com/api-reference/official-video/kling/image-to-video-create
POST /v1/videos/create/kling/image2video
官方文档:[https://app.klingai.com/cn/dev/document-api/apiReference/model/imageToVideo](https://app.klingai.com/cn/dev/document-api/apiReference/model/imageToVideo)
## Endpoint
```http theme={null}
POST /v1/videos/create/kling/image2video
```
**分组**: 官方视频格式 / 可灵
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/create/kling/image2video:
post:
summary: 创建图生视频任务
deprecated: false
description: >-
官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/imageToVideo
tags:
- 官方视频格式/可灵
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: >-
模型名称kling-v1、kling-v1-6、kling-v2-1-master、kling-v2-master、kling-v2-5-turbo、kling-v2-6
example: ''
type: string
required:
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-409742546-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询图生视频进度
Source: https://docs.agicto.com/api-reference/official-video/kling/image-to-video-retrieve
GET /v1/videos/status/kling/image2video/{id}
官方文档:[https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo](https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo)
## Endpoint
```http theme={null}
GET /v1/videos/status/kling/image2video/{id}
```
**分组**: 官方视频格式 / 可灵
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/status/kling/image2video/{id}:
get:
summary: 查询图生视频进度
deprecated: false
description: >-
官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo
tags:
- 官方视频格式/可灵
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-409742657-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 创建文生视频任务
Source: https://docs.agicto.com/api-reference/official-video/kling/text-to-video-create
POST /v1/videos/create/kling/text2video
官方文档:[https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo](https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo)
## Endpoint
```http theme={null}
POST /v1/videos/create/kling/text2video
```
**分组**: 官方视频格式 / 可灵
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/create/kling/text2video:
post:
summary: 创建文生视频任务
deprecated: false
description: >-
官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo
tags:
- 官方视频格式/可灵
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: >-
模型名称kling-v1、kling-v1-6、kling-v2-1-master、kling-v2-master、kling-v2-5-turbo、kling-v2-6
example: ''
type: string
required:
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-390050929-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询文生视频进度
Source: https://docs.agicto.com/api-reference/official-video/kling/text-to-video-retrieve
GET /v1/videos/status/kling/text2video/{id}
官方文档:[https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo](https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo)
## Endpoint
```http theme={null}
GET /v1/videos/status/kling/text2video/{id}
```
**分组**: 官方视频格式 / 可灵
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/status/kling/text2video/{id}:
get:
summary: 查询文生视频进度
deprecated: false
description: >-
官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo
tags:
- 官方视频格式/可灵
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-390050930-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 创建视频生音效任务
Source: https://docs.agicto.com/api-reference/official-video/kling/video-to-audio-create
POST /v1/videos/create/kling/videoToAudio
官方文档:[https://app.klingai.com/cn/dev/document-api/apiReference/model/videoToAudio](https://app.klingai.com/cn/dev/document-api/apiReference/model/videoToAudio)
## Endpoint
```http theme={null}
POST /v1/videos/create/kling/videoToAudio
```
**分组**: 官方视频格式 / 可灵
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/create/kling/videoToAudio:
post:
summary: 创建视频生音效任务
deprecated: false
description: >-
官方文档:https://app.klingai.com/cn/dev/document-api/apiReference/model/videoToAudio
tags:
- 官方视频格式/可灵
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties: {}
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-413897387-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频生音效进度
Source: https://docs.agicto.com/api-reference/official-video/kling/video-to-audio-retrieve
GET /v1/videos/status/kling/videoToAudio/{id}
[https://app.klingai.com/cn/dev/document-api/apiReference/model/videoToAudio](https://app.klingai.com/cn/dev/document-api/apiReference/model/videoToAudio)
## Endpoint
```http theme={null}
GET /v1/videos/status/kling/videoToAudio/{id}
```
**分组**: 官方视频格式 / 可灵
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/status/kling/videoToAudio/{id}:
get:
summary: 查询视频生音效进度
deprecated: false
description: >-
https://app.klingai.com/cn/dev/document-api/apiReference/model/videoToAudio
tags:
- 官方视频格式/可灵
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-413897484-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 提交视频任务
Source: https://docs.agicto.com/api-reference/official-video/wanxing/create
POST /v1/videos/create/wanxing
官方文档:[https://bailian.console.aliyun.com/?spm=5176.12818093\_47.overview\_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393](https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393)
## Endpoint
```http theme={null}
POST /v1/videos/create/wanxing
```
**分组**: 官方视频格式 / 万相
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/create/wanxing:
post:
summary: 提交视频任务
deprecated: false
description: >-
官方文档:https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv&tab=api#/api/?type=model&url=2867393
tags:
- 官方视频格式/万相
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: 模型名称wan2.5-i2v-preview、wan2.6-t2v
example: ''
type: string
required:
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/万相
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386675247-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/official-video/wanxing/retrieve
GET /v1/videos/status/wanxing/{id}
官方文档:[https://bailian.console.aliyun.com/?spm=5176.12818093\_47.overview\_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393](https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393)
## Endpoint
```http theme={null}
GET /v1/videos/status/wanxing/{id}
```
**分组**: 官方视频格式 / 万相
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/status/wanxing/{id}:
get:
summary: 查询视频详情
deprecated: false
description: >-
官方文档:https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv&tab=api#/api/?type=model&url=2867393
tags:
- 官方视频格式/万相
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
status:
type: string
progress:
type: integer
video_url:
type: string
created_at:
type: integer
required:
- id
- object
- status
- progress
- video_url
- created_at
x-apifox-orders:
- id
- object
- status
- progress
- video_url
- created_at
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
status: completed
progress: 100
video_url: ''
created_at: 1764849891
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 官方视频格式/万相
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386675248-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 提交视频任务
Source: https://docs.agicto.com/api-reference/openai-video/kling/create
POST /v1/videos
官方文档:[https://bailian.console.aliyun.com/?spm=5176.12818093\_47.overview\_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393](https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393)
## Endpoint
```http theme={null}
POST /v1/videos
```
**分组**: openai视频格式 / 可灵
## Headers
* `x-base-url`: 必填 示例: `https://api.aimlapi.com/v2`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos:
post:
summary: 提交视频任务
deprecated: false
description: >-
官方文档:https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv&tab=api#/api/?type=model&url=2867393
tags:
- openai视频格式/可灵
parameters:
- name: x-base-url
in: header
description: ''
required: true
example: https://api.aimlapi.com/v2
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: kling-video-o1
example: kling-video-o1
type: string
prompt:
description: 提示词
example: ''
type: string
seconds:
description: 视频时长 5、10
example: ''
type: string
size:
description: 视频比例:16:9、9:16
example: ''
type: string
first_frame_image:
description: 首帧图
example: ''
type: string
last_frame_image:
description: 尾帧图
example: ''
type: string
input_reference:
description: 参考图对象,格式如{file:文件数组}
example: ''
type: string
required:
- model
- prompt
- seconds
- size
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-390052414-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/openai-video/kling/retrieve
GET /v1/videos/{id}
## Endpoint
```http theme={null}
GET /v1/videos/{id}
```
**分组**: openai视频格式 / 可灵
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/{id}:
get:
summary: 查询视频详情
deprecated: false
description: ''
tags:
- openai视频格式/可灵
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
status:
type: string
progress:
type: integer
video_url:
type: string
created_at:
type: integer
required:
- id
- object
- status
- progress
- video_url
- created_at
x-apifox-orders:
- id
- object
- status
- progress
- video_url
- created_at
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
status: completed
progress: 100
video_url: ''
created_at: 1764849891
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/可灵
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-390052415-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 创建视频
Source: https://docs.agicto.com/api-reference/openai-video/sora/create
POST /v1/videos
官方文档:[https://platform.openai.com/docs/api-reference/videos/create](https://platform.openai.com/docs/api-reference/videos/create)
## Endpoint
```http theme={null}
POST /v1/videos
```
**分组**: openai视频格式 / sora
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos:
post:
summary: 创建视频
deprecated: false
description: 官方文档:https://platform.openai.com/docs/api-reference/videos/create
tags:
- openai视频格式/sora
parameters: []
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: |-
枚举值:
sora-2-vip
sora-2-pro-vip
sora-2:不稳定
sora-2-pro:不稳定
example: sora-2
type: string
prompt:
description: 提示词
example: 画面动起来
type: string
seconds:
description: |
4、8、12
example: '10'
type: string
size:
description: |-
宽x高,会忽略具体数据 宽>高 为横屏,宽<高为竖屏
720x1280
1280x720
1024x1792
1792x1024
example: 720x1280
type: string
input_reference:
format: binary
type: string
description: 参考图
example: ''
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
model:
type: string
status:
type: string
progress:
type: integer
created_at:
type: integer
seconds:
type: string
size:
type: string
required:
- id
- object
- model
- status
- progress
- created_at
- seconds
- size
x-apifox-orders:
- id
- object
- model
- status
- progress
- created_at
- seconds
- size
example:
id: video_fe6f922f-da34-48a4-9c35-e71df5950cbf
object: video
model: sora-2
status: queued
progress: 0
created_at: 1764649117
seconds: '10'
size: 720x1280
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/sora
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-384880011-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 下载视频
Source: https://docs.agicto.com/api-reference/openai-video/sora/download
GET /v1/videos/{id}/content
## Endpoint
```http theme={null}
GET /v1/videos/{id}/content
```
**分组**: openai视频格式 / sora
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/{id}/content:
get:
summary: 下载视频
deprecated: false
description: ''
tags:
- openai视频格式/sora
parameters:
- name: id
in: path
description: 任务id
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/sora
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-384880159-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/openai-video/sora/retrieve
GET /v1/videos/{id}
## Endpoint
```http theme={null}
GET /v1/videos/{id}
```
**分组**: openai视频格式 / sora
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/{id}:
get:
summary: 查询视频详情
deprecated: false
description: ''
tags:
- openai视频格式/sora
parameters:
- name: id
in: path
description: 任务id
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
completed_at:
type: integer
created_at:
type: integer
id:
type: string
model:
type: string
object:
type: string
progress:
type: integer
seconds:
type: string
size:
type: string
status:
type: string
description: in_progress、completed
video_url:
type: string
required:
- completed_at
- created_at
- id
- model
- object
- progress
- seconds
- size
- status
- video_url
x-apifox-orders:
- completed_at
- created_at
- id
- model
- object
- progress
- seconds
- size
- status
- video_url
example:
created_at: 1764649117
id: video_fe6f922f-da34-48a4-9c35-e71df5950cbf
model: sora-2
object: video
progress: 45
seconds: '10'
size: 720x1280
status: in_progress
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/sora
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-384880097-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 提交视频任务
Source: https://docs.agicto.com/api-reference/openai-video/veo/create
POST /v1/videos
官方文档:[https://ai.google.dev/gemini-api/docs/video?hl=zh-cn\&example=dialogue](https://ai.google.dev/gemini-api/docs/video?hl=zh-cn\&example=dialogue)
## Endpoint
```http theme={null}
POST /v1/videos
```
**分组**: openai视频格式 / veo
## Headers
* `Authorization`: 必填 示例: `sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos:
post:
summary: 提交视频任务
deprecated: false
description: >-
官方文档:https://ai.google.dev/gemini-api/docs/video?hl=zh-cn&example=dialogue
tags:
- openai视频格式/veo
parameters:
- name: Authorization
in: header
description: ''
required: true
example: sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
prompt:
description: 提示词
example: ''
type: string
model:
description: 模型名称veo3.1、veo3.1-pro
example: ''
type: string
seconds:
type: string
description: 视频时长4、6、8
example: ''
size:
type: string
description: 视频宽高比16:9、9:16
example: ''
input_reference:
format: binary
type: string
description: 参考图片
example: ''
required:
- prompt
- model
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
model:
type: string
status:
type: string
created_at:
type: integer
seconds:
type: string
required:
- id
- object
- model
- status
- created_at
- seconds
x-apifox-orders:
- id
- object
- model
- status
- created_at
- seconds
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
model: veo3.1
status: queued
created_at: 1764849835
seconds: '6'
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/veo
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386221934-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/openai-video/veo/retrieve
GET /v1/videos/{id}
## Endpoint
```http theme={null}
GET /v1/videos/{id}
```
**分组**: openai视频格式 / veo
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/{id}:
get:
summary: 查询视频详情
deprecated: false
description: ''
tags:
- openai视频格式/veo
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
status:
type: string
description: queued、completed
progress:
type: integer
video_url:
type: string
created_at:
type: integer
required:
- id
- object
- status
- progress
- video_url
- created_at
x-apifox-orders:
- id
- object
- status
- progress
- video_url
- created_at
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
status: completed
progress: 100
video_url: ''
created_at: 1764849891
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/veo
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-386222183-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 提交视频任务
Source: https://docs.agicto.com/api-reference/openai-video/vidu/create
POST /v1/videos
官方文档:[https://bailian.console.aliyun.com/?spm=5176.12818093\_47.overview\_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393](https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv\&tab=api#/api/?type=model\&url=2867393)
## Endpoint
```http theme={null}
POST /v1/videos
```
**分组**: openai视频格式 / vidu
## Headers
* `x-base-url`: 必填 示例: `https://api.aimlapi.com/v2`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos:
post:
summary: 提交视频任务
deprecated: false
description: >-
官方文档:https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.5.7a6e2cc9UHSwkv&tab=api#/api/?type=model&url=2867393
tags:
- openai视频格式/vidu
parameters:
- name: x-base-url
in: header
description: ''
required: true
example: https://api.aimlapi.com/v2
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
model:
description: 模型:viduq2-pro_1080p、viduq2-pro_720p
example: ''
type: string
prompt:
description: 提示词
example: ''
type: string
seconds:
description: 视频时长 >= 1且< 8
example: ''
type: string
size:
description: 视频比例:16:9、9:16
example: ''
type: string
input_reference:
format: binary
type: string
description: 参考图
example: ''
required:
- model
- prompt
- seconds
- size
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
x-apifox-orders: []
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/vidu
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-390275015-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 查询视频详情
Source: https://docs.agicto.com/api-reference/openai-video/vidu/retrieve
GET /v1/videos/{id}
## Endpoint
```http theme={null}
GET /v1/videos/{id}
```
**分组**: openai视频格式 / vidu
## Headers
* `Authorization`: 可选 示例: `Bearer `
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/videos/{id}:
get:
summary: 查询视频详情
deprecated: false
description: ''
tags:
- openai视频格式/vidu
parameters:
- name: id
in: path
description: ''
required: true
schema:
type: string
- name: Authorization
in: header
description: ''
required: false
example: 'Bearer '
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
id:
type: string
object:
type: string
status:
type: string
progress:
type: integer
video_url:
type: string
created_at:
type: integer
required:
- id
- object
- status
- progress
- video_url
- created_at
x-apifox-orders:
- id
- object
- status
- progress
- video_url
- created_at
example:
id: 83319f9e-9828-4a17-bf3e-365edbcf226b
object: video
status: completed
progress: 100
video_url: ''
created_at: 1764849891
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: openai视频格式/vidu
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-390275016-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 热榜
Source: https://docs.agicto.com/api-reference/tools/hot-hub
POST /v1/tool/hotHub
## Endpoint
```http theme={null}
POST /v1/tool/hotHub
```
**分组**: 工具
## Headers
* `Authorization`: 必填 示例: `Bearer sk-`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"keywords": "健康"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/tool/hotHub:
post:
summary: 热榜
deprecated: false
description: ''
tags:
- 工具
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
keywords:
type: integer
description: 分类,如健康/娱乐/科技
required:
- keywords
x-apifox-orders:
- keywords
example:
keywords: 健康
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 工具
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-284688382-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 发票OCR识别
Source: https://docs.agicto.com/api-reference/tools/invoice/ocr
POST /v1/tool/invoiceOcr
## Endpoint
```http theme={null}
POST /v1/tool/invoiceOcr
```
**分组**: 工具 / 发票
## Headers
* `Authorization`: 必填 示例: `Bearer sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/tool/invoiceOcr:
post:
summary: 发票OCR识别
deprecated: false
description: ''
tags:
- 工具/发票
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
base64:
type: string
description: >-
照片base64字符串,base64、pdfBase64、ofdBase64、url 必须提供一个,优先级 base64
> pdfBase64 > ofdBase64 > url
nullable: true
url:
type: string
description: >-
照片 url,base64、pdfBase64、ofdBase64、url 必须提供一个,优先级 base64 >
pdfBase64 > ofdBase64 > url
pdfBase64:
type: string
description: >-
pdf文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,base64、pdfBase64、ofdBase64、url
必须提供一个,优先级 base64 > pdfBase64 > ofdBase64 > url
pdfFileNum:
type: string
description: 识别pdfBase64中对应的文件页,默认1
nullable: true
type:
type: string
description: 识别的发票类型,默认normal , normal:可识别增值税普票、专票、电子发票 - roll:可识别增值税卷票
nullable: true
ofdBase64:
type: string
description: >-
发票ofd文件base64字符串。base64、pdfBase64、ofdBase64、url 必须提供一个,优先级
base64 > pdfBase64 > ofdBase64 > url
ofdFileNum:
type: string
description: 识别ofd文件对应的文件页,默认1
required:
- pdfBase64
- url
- ofdFileNum
- ofdBase64
x-apifox-orders:
- base64
- url
- pdfBase64
- pdfFileNum
- type
- ofdBase64
- ofdFileNum
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
example: "{\r\n \"data\": {\r\n \"amountInWords\": \"壹拾圆整\",//价税合计(大写)\r\n \"invoiceTypeOrg\": \"\",//发票名称\r\n \"machineNum\":\"\",//机打号码。仅增值税卷票含有此参数\r\n \"agent\": \"否\",//是否代开\r\n \"city\": \"\",//市\r\n \"commodityNum\": [//数量\r\n {\r\n \"row\": \"\",//行号\r\n \"word\":\"\"//内容\r\n }\r\n ],\r\n \"sellerBank\": \"\",//销售方开户行及账号 \r\n \"sellerName\": \"\",//销售方名称 \r\n \"sellerAddress\": \"\",//销售方地址及电话 \r\n \"checker\": \"\",//复核\r\n \"purchaserAddress\": \"\",//购方地址及电话\r\n \"totalTax\": \"***\",//合计税额\r\n \"payee\": \"\",//收款人\r\n \"password\": \"\",//密码区\r\n \"province\": \"浙江\",//省\r\n \"noteDrawer\": \"\",//开票人\r\n \"invoiceType\": \"电子普通发票\",//发票种类。不同类型发票输出:普通发票、专用发票、电子普通发票、电子专用发票、通行费电子普票、区块链发票、通用机打电子发票、电子发票(专用发票)、电子发票(普通发票)\r\n \"amountInFiguers\": \"10.00\",//价税合计(小写)\r\n \"commodityPlateNum\": [//车牌号。仅通行费增值税电子普通发票含有此参数\r\n {\r\n \"row\": \"1\",//行号\r\n \"word\": \"***\"//内容\r\n }\r\n ],\r\n \"commodityTax\": [//税额\r\n {\r\n \"row\": \"1\",//行号\r\n \"word\": \"***\"//内容\r\n }\r\n ],\r\n \"purchaserBank\": \"\",//购方开户行及账号\r\n \"machineCode\": \"\",//机器编号。仅增值税卷票含有此参数\r\n \"invoiceNumConfirm\": \"\",//发票号码的辅助校验码\r\n \"commodityStartDate\": [//通行日期起。仅通行费增值税电子普通发票含有此参数\r\n {\r\n \"row\": \"\",//行号\r\n \"word\":\"\"//内容\r\n }\r\n ],\r\n \"sellerRegisterNum\": \"\",//销售方纳税人识别号\r\n \"commodityEndDate\": [//通行日期止。仅通行费增值税电子普通发票含有此参数\r\n {\r\n \"row\": \"\",//行号\r\n \"word\":\"\"//内容\r\n }\r\n ],\r\n \"sheetNum\": \"\",//联次信息。专票第一联到第三联分别输出:第一联:记账联、第二联:抵扣联、第三联:发票联;普通发票第一联到第二联分别输出:第一联:记账联、第二联:发票联\r\n \"invoiceDate\": \"2021年11月12日\",//开票日期\r\n \"commodityPrice\": [//单价\r\n {\r\n \"row\": \"\",//行号\r\n \"word\":\"\"//内容\r\n }\r\n ],\r\n \"invoiceCode\": \"\",//发票代码\r\n \"onlinePay\": \"\",//电子支付标识。仅区块链发票含有此参数\r\n \"commodityType\": [//规格型号\r\n {\r\n \"row\": \"\",//行号\r\n \"word\":\"\"//内容\r\n }\r\n ],\r\n \"invoiceNum\": \"\",//发票号码\r\n \"purchaserName\": \"\",//购方名称\r\n \"checkCode\": \"\",//校验码。增值税专票无此参数\r\n \"totalAmount\": \"10.00\",//合计金额\r\n \"commodityVehicleType\": [//类型。仅通行费增值税电子普通发票含有此参数\r\n {\r\n \"row\": \"1\",//行号\r\n \"word\": \"***\"//内容\r\n }\r\n ],\r\n \"commodityAmount\": [//金额\r\n {\r\n \"row\": \"1\",//行号\r\n \"word\": \"10.00\"//内容\r\n }\r\n ],\r\n \"purchaserRegisterNum\": \"\",//购方纳税人识别号\r\n \"commodityTaxRate\": [//税率\r\n {\r\n \"row\": \"1\",//行号\r\n \"word\": \"0%\"//内容\r\n }\r\n ],\r\n \"commodityUnit\": [//单位\r\n {\r\n \"row\": \"\",//行号\r\n \"word\":\"\"//内容\r\n }\r\n ],\r\n \"invoiceCodeConfirm\": \"033002100611\",//发票代码的辅助校验码\r\n \"remarks\": \"\",//备注\r\n \"commodityName\": [//货物名称\r\n {\r\n \"row\": \"1\",//行号\r\n \"word\": \"*餐饮服务*货物\"//内容\r\n }\r\n ]\r\n },\r\n \"code\": 200, // 详见code返回码说明\r\n \"msg\": \"成功\", // code 对应的描述\r\n \"taskNo\": \"30853523396532582768\", // 本次请求号\r\n}"
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 工具/发票
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-297299411-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 发票查验
Source: https://docs.agicto.com/api-reference/tools/invoice/validate
POST /v1/tool/invoiceValidate
## Endpoint
```http theme={null}
POST /v1/tool/invoiceValidate
```
**分组**: 工具 / 发票
## Headers
* `Authorization`: 必填 示例: `Bearer sk-`
* `Content-Type`: 必填 示例: `application/json`
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/tool/invoiceValidate:
post:
summary: 发票查验
deprecated: false
description: ''
tags:
- 工具/发票
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
fpdm:
type: string
title: 发票代码
description: 非全电发票必填
nullable: true
fphm:
type: string
title: 发票号码
kprq:
type: string
title: 开票日期
description: 格式YYYYMMDD
jym:
type: string
description: 校验码后 6 位, 增值税普通发票、增值税电子普通发票、增值税普通发票(卷式)、增值税电子普通发票(通行费)必填
nullable: true
je:
type: string
description: >-
增值税专用发票、增值税电子专用发票、机动车销售统一发票输入不含税金额; 二手车销售统一发票输入车价合计;
全电发票输入价税合计
nullable: true
required:
- kprq
- fphm
x-apifox-orders:
- fpdm
- fphm
- kprq
- jym
- je
examples: {}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
example: "增值税发票 (01)\r\n{\r\n \"code\": 200, // 返回码,详见code返回码说明\r\n \"msg\": \"成功\", //code对应的描述\r\n \"taskNo\": \"12552230716560623515\", // 本次唯一请求号\r\n \"data\": {\r\n \"fplx\": \"01\", // 发票类型,详见发票类型说明\r\n \"times\": 4, // 查验次数(第几次)\r\n \"xfsbh\":\"1522***********K01451\", //销方识别号\r\n \"gfmc\":\"东方****有限公司\", //购方名称\r\n \"gmfyhzh\":\"工行杭州景江苑支行 12******************36\", //购买方银行账号\r\n \"xhqdBz\":\"N\", //清单标志:发票明细中是否有清单行(Y清单 N非清单)\r\n \"dkXsfmc\":\"马*弟<\", //代开销售方名称\r\n \"dq\":\"内蒙古自治区\", //地区\r\n \"tspzDm\": \"\", // 特殊票种代码,02农产品收购发票 08成品油发票\r\n \"xsfdzdh\":\"乌兰浩特市 1584****535\", //销售方地址电话\r\n \"se\":240, //税额\r\n \"kprq\":\"2022-01-04 00:00:00\", //开票日期\r\n \"bz\":\"代开企业税号:15222*****71610 代开企业名称:马*弟
房屋坐落地址:乌兰浩特市爱国小区*号楼\", //备注\r\n \"kjlx\":\"2\", //开具类型\r\n \"fpztDm\":\"0\", //发票状态代码\r\n \"sbbh\":\"661816407119\", //设备编号\r\n \"gfsbh\":\"91330********66XE\", //购方识别号\r\n \"fpdm\":\"150*****60\", //发票代码\r\n \"fphm\":\"00****89\", //发票号码\r\n \"jym\":\"69591030500952264929\", //校验码\r\n \"dkXsfsbh\":\"152**************610\", //代开销售方识别号\r\n \"gmfdzdh\":\"杭州市滨江区****66号 0571-8*****34\", //购买方地址电话\r\n \"xsfyhzh\":\"31522***********07111\", //销售方银行账号\r\n \"jshj\":16800, //价税合计\r\n \"jshjcn\":\"壹万陆仟捌佰元整\", //价税合计(中文大写)\r\n \"je\":16560, //金额\r\n \"xfmc\":\"国家税务总局乌兰浩特市税务局第一税务分局\", //销方名称\r\n \"txfbz\":\"Y\",//如果是通行费,则有该字段,Y表示该通行费可抵扣,N表示不可以抵扣 //通行费标识\r\n \"hwxx\":[ //货物信息\r\n {\r\n \"ggxh\":\"\", //规格型号\r\n \"jldw\":\"套\", //计量单位\r\n \"dj\":\"16560.00\", //单价\r\n \"mxxh\":1, //明细序号\r\n \"se\":240, //税额\r\n \"ysse\":\"240\", //原始税额\r\n \"mc\":\"房屋租赁(20220101-20221231)\", //名称\r\n \"sl\":\"1\", //数量\r\n \"je\":16560, //金额\r\n \"slv\":0.015, //税率\r\n \"ysslv\":\"1.5%\", //原始税率\r\n \"spbm\":\"\" //商品编码\r\n }\r\n ]\r\n }\r\n}\r\n\r\n机动车销售统一发票(03)\r\n{\r\n \"code\": 200,\r\n \"msg\": \"成功\",\r\n \"taskNo\": \"12552230716560623515\",\r\n \"data\": {\r\n \"fplx\": \"03\", //发票类型 ,详见发票类型说明\r\n \"times\": 4, //查验次数 (第几次)\r\n \"cjhm\":\"JN8BY2NY0J912****\", // 车架号码/车辆识别代码\r\n \"dh\":\"022-8625****\", //电话\r\n \"gfmc\":\"陈**\", // 购买方名称\r\n \"sfzhm\":\"4203*********2712\", //身份证号码/组织机构代码\r\n \"xhdwsbh\":\"9112*********C933\", // 销货单位纳税人识别号\r\n \"dq\":\"天津\", //地区\r\n \"jshjcn\":\"肆拾叁万伍仟伍佰元整\", //价税合计中文大写\r\n \"dw\":\"\", //吨位\r\n \"yszzsse\":\"60068.97\", //原始增值税税额字段\r\n \"xcrs\":\"7\", //限乘人数\r\n \"kprq\":\"2018-09-19 00:00:00\", //开票日期\r\n \"dz\":\"天津自贸实验区(天津港保税区)**广场*号****汽车城****室\", //地址\r\n \"kjlx\":\"1\", //开具类型标识:1自开 2代开 3代办退税\r\n \"cllx\":\"越野车\", //车辆类型\r\n \"fpztDm\":\"0\", //发票状态代码:发票状态代码 0正常 1失控(历史数据) 2作废 3已红冲\r\n \"hgzh\":\"\", //合格证号\r\n \"khyh\":\"中国银行股份有限公司天津***分行\", //开户银行\r\n \"sbbh\":\"661604157082\", //机打代码/机打号码\r\n \"gfsbh\":\" \", //购买方纳税人识别号\r\n \"cd\":\"日本\", //产地\r\n \"fpdm\":\"1120****0160\", //发票代码 \r\n \"swjgMc\":\"原天津市保税区国家税务局第三税务所\", //主管税务机关名称\r\n \"sjdh\":\"BA021****\", //商检单号\r\n \"zh\":\"27008115****\", //账号\r\n \"swjgDm\":\"112942200\", //主管税务机关代码\r\n \"wspzhm\":\"\", //完税凭证号码\r\n \"lslbs\":\" \", //零税率标识:空:非零税率,0:出口零税,1:免税,2:不征税,3 普通零税率\r\n \"cpxh\":\"克罗迪 涂乐 ****CC越野车\", //厂牌型号\r\n \"zzsse\":60068.97, //增值税税额\r\n \"jkzmsh\":\"H0218023****\", // 进口证明书号\r\n \"xhdwmc\":\"天津****贸易有限公司\", //销货单位名称\r\n \"jshj\":435500, //价税合计\r\n \"je\":375431.03, //不含税价\r\n \"slv\":0.16, //增值税税率或征收率\r\n \"ysslv\":\"16%\", //原始税率字符串\r\n \"fdjhm\":\"VQ40664****\", //发动机号码\r\n \"fphm\":\"00****97\" //发票号码\r\n }\r\n}\r\n\r\n增值税普通发票(04)\r\n{\r\n \"code\": 200,\r\n \"msg\": \"成功\",\r\n \"taskNo\": \"12552230716560623515\",\r\n \"data\": {\r\n \"fplx\": \"04\", //发票类型 ,详见发票类型说明\r\n \"times\": 4, //查验次数 (第几次)\r\n \"xfsbh\":\"4303**********3014\", //销售方识别号\r\n \"gfmc\":\"湘潭市**包装有限公司\", //购买方名称\r\n \"gmfyhzh\":\"中国银行股份有限公司*****支行6054****4355\", //购买方银行账号\r\n \"xhqdBz\":\"N\", //清单标志:发票明细中是否有清单行(Y清单 N非清单)\r\n \"tspzDm\":\"02\", //特殊票种代码,02农产品收购发票 08成品油发票\r\n \"dq\":\"湖南\", //地区\r\n \"xsfdzdh\":\"\", //销售方地址电话\r\n \"se\":0, //税额\r\n \"kprq\":\"2018-08-18 00:00:00\", //开票日期\r\n \"bz\":\"\", //备注\r\n \"kjlx\":\"1\", //开具类型标识:1自开 2代开 3代办退税\r\n \"fpztDm\":\"0\", //(电子底账用)发票状态代码:发票状态代码 0正常 1失控(历史数据) 2作废 3已红冲\r\n \"sbbh\":\"661510345883\", //设备/机器编号:税控盘号、金税盘号\r\n \"gfsbh\":\"9143**********016C\", //购买方识别号\r\n \"fpdm\":\"0430****0104\", //发票代码\r\n \"gmfdzdh\":\"湘潭市**区**村 0731-52****99\", //购买方地址电话\r\n \"xsfyhzh\":\"\", //销售方银行账号\r\n \"jshj\":9672, //价税合计\r\n \"jshjcn\":\"玖仟陆佰柒拾贰元整\", //价税合计(中文大写)\r\n \"je\":9672, //金额\r\n \"xfmc\":\"冯*春\", //销售方名称\r\n \"fphm\":\"26****02\", //发票号码\r\n \"jym\":\"7699*************4758\" , //校验码\r\n \"hwxx\":[ //货物信息\r\n {\r\n \"ggxh\":\"\", //规格型号\r\n \"jldw\":\"吨\", //计量单位\r\n \"dj\":\"800.00\", //单价\r\n \"mxxh\":1, //明细序号\r\n \"lslbs\":\"1\", //零税率标识:空:非零税率,0:出口零税,1:免税,2:不征税,3 普通零税率\r\n \"se\":0, //税额\r\n \"ysse\":\"***\", //原始税额字符串\r\n \"mc\":\"*林业产品*松元木\", //货物劳务名称\r\n \"sl\":\"12.09\", //数量\r\n \"je\":9672, //金额\r\n \"slv\":0, //税率\r\n \"ysslv\":\"免税\", //原始税率字符串\r\n \"spbm\":\"1010202010000000000\" //税局编码/税收分类编码\r\n }\r\n ]\r\n }\r\n}\r\n\r\n增值税电子专票和增值税电子普票(08)\r\n{\r\n \"code\": 200, // 返回码,详见code返回码说明\r\n \"msg\": \"成功\", //code对应的描述\r\n \"taskNo\": \"12552230716560623515\", // 本次唯一请求号\r\n \"data\": { \r\n \"fplx\": \"08\", // 发票类型,详见发票类型说明\r\n \"times\": 4, // 查验次数(第几次)\r\n \"xfsbh\":\"91330******M3FR34P\", //销方识别号\r\n \"gfmc\":\"广州***集成家居有限公司\", //购方名称\r\n \"gmfyhzh\":\"招商银行股份有限公司广州**支行12091****10777\", //购买方银行账号\r\n \"xhqdBz\":\"N\", //清单标志:发票明细中是否有清单行(Y清单 N非清单)\r\n \"purl\":\"https://****\", //PDF版式文件下载链接(只有税务ukey开具的电子专票和电子普票有)\r\n \"dq\":\"浙江\", //地区\r\n \"tspzDm\": \"\", // 特殊票种代码,02农产品收购发票 08成品油发票\r\n \"xsfdzdh\":\"浙江省义乌市**街道**路*号*楼0579-85****66\", //销售方地址电话\r\n \"se\":54.51, //税额\r\n \"kprq\":\"2021-10-09 00:00:00\", //开票日期\r\n \"bz\":\"\", //备注\r\n \"kjlx\":\"1\", //开具类型\r\n \"fpztDm\":\"0\", //发票状态代码\r\n \"sbbh\":\"917106314504\", //设备编号\r\n \"gfsbh\":\"91440*******QD3L35\", //购方识别号\r\n \"fpdm\":\"0330****0113\", //发票代码\r\n \"url\":\"https://******\", //OFD版式文件下载链接(只有税务ukey开具的电子专票和电子普票有)\r\n \"gmfdzdh\":\"广州市增城区**镇****村、**村(办公楼D)020-82****98\", //购买方地址电话\r\n \"xsfyhzh\":\"宁波银行股份有限公司****支行79040******245913\", //销售方银行账号\r\n \"jshj\":963, //价税合计\r\n \"jshjcn\":\"玖佰陆拾叁元整\", //价税合计(中文大写)\r\n \"je\":908.49, //金额\r\n \"xfmc\":\"义乌市**酒店管理有限公司\", //销方名称,\r\n \"fphm\":\"09****92\", //发票号码\r\n \"jym\":\"10959777606333*******\" //校验码\r\n \"hwxx\":[ //货物信息\r\n {\r\n \"ggxh\":\"\", //规格型号\r\n \"jldw\":\"天\", //计量单位\r\n \"dj\":\"181.698113\", //单价\r\n \"mxxh\":1, //明细序号\r\n \"se\":54.51, //税额\r\n \"ysse\":\"54.51\", //原始税额\r\n \"mc\":\"*住宿服务*住宿费\", //名称\r\n \"sl\":\"5.000000\", //数量\r\n \"je\":908.49, //金额\r\n \"slv\":0.06, //税率\r\n \"ysslv\":\"6%\", //原始税率\r\n \"spbm\":\"30704*********000000\" //商品编码\r\n }\r\n ]\r\n }\r\n}\r\n\r\n通行费发票/增值税电子普通发票(通行费)(14)\r\n{\r\n \"code\": 200,\r\n \"msg\": \"成功\",\r\n \"taskNo\": \"12552230716560623515\",\r\n \"data\": {\r\n \"fplx\": \"14\", // 发票类型,详见发票类型说明\r\n \"times\": 4, // 查验次数(第几次)\r\n }\r\n}\r\n\r\n\r\n二手车销售统一发票查验成功返回结果(15)\r\n{\r\n \"code\": 200,\r\n \"msg\": \"成功\",\r\n \"taskNo\": \"12552230716560623515\",\r\n \"data\": {\r\n \"fplx\": \"15\", // 发票类型,详见发票类型说明\r\n \"times\": 4, // 查验次数(第几次)\r\n \"xfsbh\":\"9142**********988G\", //销方识别号\r\n \"gfmc\":\"中国**集团有限公司\", //购方名称\r\n \"gmfyhzh\":\"建行***支行 4200*********0980\", //购买方银行账号\r\n \"dq\":\"湖北\", //地区\r\n \"xsfdzdh\":\"湖北省**市**县***农场**管理所 027-83****68\", //销售方地址电话\r\n \"jshjcn\":\"壹佰零伍元玖角捌分\", //价税合计(中文大写)\r\n \"se\":3.09, //税额\r\n \"kprq\":\"2022-06-14 00:00:00\", //开票日期\r\n \"bz\":\"汇总开具\", //备注\r\n \"kjlx\":\"1\", //开具类型\r\n \"fpztDm\":\"0\", //发票状态代码\r\n \"sbbh\":\"499099651596\", //设备编号\r\n \"txfbz\":\"Y\", //通行费标志\r\n \"gfsbh\":\"9142********5556\", //购方识别号\r\n \"fpdm\":\"042******112\", //发票代码\r\n \"fplx\":\"14\", //发票类型\r\n \"gmfdzdh\":\"**区**街坊(**区**路*号****大楼) 027-68****15\", //购买方地址电话\r\n \"xsfyhzh\":\"工行**县支行1814**********7451\", //销售方银行账号\r\n \"jshj\":105.98, //价税合计\r\n \"je\":102.89, //金额\r\n \"xfmc\":\"湖北**高速公路经营有限公司\", //销方名称\r\n \"fphm\":\"89****71\", //发票号码\r\n \"jym\":\"0335************4357\", //校验码\r\n \"hwxx\":[\r\n {\r\n \"mxxh\":1, //明细序号\r\n \"ggxh\":\"鄂******\", //车牌号\r\n \"jldw\":\"客车\", //类型\r\n \"sl\":\"20220602\", //数量(通行日期起)\r\n \"dj\":\"20220610\", //单价(通行日期止)\r\n \"txrqq\":\"20220602\", //通行日期起\r\n \"txrqz\":\"20220610\", //通行日期止\r\n \"lslbs\":\" \", //零税率标识\r\n \"se\":3.09, //税额\r\n \"ysse\":\"3.09\", //原始税额\r\n \"mc\":\"经营租赁通行费\", //名称\r\n \"je\":102.89, //金额\r\n \"slv\":0.03, //税率\r\n \"ysslv\":\"3%\", //原始税率\r\n \"spbm\":\"3040502020301000000\" //商品编码\r\n }\r\n ]\r\n }\r\n}\r\n\r\n全电纸质(机动车销售统一发票)(0903)\r\n{\r\n \"code\": 200, // 返回码,详见code返回码说明\r\n \"msg\": \"成功\", //code对应的描述\r\n \"taskNo\": \"12552230716560623515\", // 本次唯一请求号\r\n \"data\": {\r\n \"fplx\": \"0903\", //发票类型\r\n \"times\": 4, // 查验次数(第几次)\r\n \"dq\": \"天*\", //地区\r\n \"fpdm\": \"11******60\", //发票代码\r\n \"fphm\": \"00****11\", //发票号码\r\n \"kprq\": \"2023-11-17 00:00:00\",//开票日期\r\n \"gfmc\": \"张**\", //购方名称\r\n \"sfzhm\": \"\", //身份证号码\r\n \"gfsbh\": \"12*******29\", //购方识别号\r\n \"cllx\": \"插电式混合动力轿车\", //车辆类型\r\n \"cpxh\": \"比亚迪牌******\", //厂牌型号\r\n \"cd\": \"深圳市\", //产地\r\n \"hgzh\": \"YK********15\", //合格证号\r\n \"jkzmsh\": \"无\", //进口证明书号\r\n \"sjdh\": \"无\", //商检单号\r\n \"fdjhm\": \"L2*****61\", //发动机号码\r\n \"cjhm\": \"LC*******32\", //车架号码/车辆识别代码\r\n \"jshj\": 213800.00, //价税合计\r\n \"jshjcn\": \"贰拾壹万叁仟捌佰元整\",//价税合计(中文大写)\r\n \"xhdwmc\": \"天津市******公司\",//销货单位名称\r\n \"dh\": \"28******11\", //电话\r\n \"xhdwsbh\": \"91*********5A\", //销货单位纳税人识别号\r\n \"zh\": \"75**********39\", //账号\r\n \"dz\": \"河西********85\", //地址\r\n \"khyh\": \"中国*******业部\", //开户银行\r\n \"slv\": 0.13, //增值税税率或征收率\r\n \"ysslv\": \"13%\", //原始税率 字符串 例【不征税】\r\n \"zzsse\": 24596.46, //增值税税额\r\n \"yszzsse\": \"24596.46\", //原始增值税税额\r\n \"swjgDm\": \"11******00\", //主管税务机关代码\r\n \"swjgMc\": \"国家********务所\", //主管税务机关名称\r\n \"je\": 189203.54, //金额(不含税)\r\n \"wspzhm\": \"\", //完税凭证号码\r\n \"dw\": \"0.5\", //吨位\r\n \"xcrs\": \"5\", //限乘人数\r\n \"kpr\": null, //开票人\r\n \"lslbs\": \"\", //税控码\r\n \"kjlx\": \"1\", //开具类型\r\n \"sbbh\": \"\", //设备编号\r\n \"fpztDm\": \"0\" //发票状态代码\r\n }\r\n}\r\n\r\n全电纸质(二手车销售统一发票)(0915)\r\n{\r\n \"code\": 200, // 返回码,详见code返回码说明\r\n \"msg\": \"成功\", //code对应的描述\r\n \"taskNo\": \"12552230716560623515\", // 本次唯一请求号\r\n \"data\": {\r\n \"fplx\": \"0915\", //发票类型\r\n \"times\": 4, // 查验次数(第几次)\r\n \"dq\": \"天津\", //地区\r\n \"fpdm\": \"01********17\", //发票代码\r\n \"fphm\": \"00****96\", //发票号码\r\n \"kprq\": \"2023-11-14 00:00:00\", //开票日期\r\n \"skm\": null, //税控码\r\n \"gfDm\": \"12**************46\", //买方单位/个人代码\r\n \"gfMc\": \"张*\", //买方单位/个人名称\r\n \"gfDz\": \"天津****************14\",//买方单位/个人地址\r\n \"gfDh\": \"13*****21\", //买方单位/个人电话\r\n \"xfDm\": \"12*************27\", //卖方单位/个人代码\r\n \"xfMc\": \"吴*\", //卖方单位/个人名称\r\n \"xfDz\": \"天津************4号\", //卖方单位/个人地址\r\n \"xfDh\": \"18*******51\", //卖方单位/个人电话\r\n \"spbm\": null, //商品编码\r\n \"cpzh\": \"津******\", //车牌照号\r\n \"djzh\": \"12********32\", //登记证号\r\n \"cllx\": \"小型轿车\", //车辆类型\r\n \"clsbdm\": \"LS******10\", //车架号/车辆识别代码\r\n \"cpxh\": \"晶锐牌********\", //厂牌型号\r\n \"zrdclglsMc\": \"天津市车辆管理所\", //转入地车辆管理所名称\r\n \"cjhj\": 1000.00, //车价合计\r\n \"cjhjcn\": \"壹仟元整\", //车价合计(中文大写)\r\n \"jyPmSbh\": \"\", //经营、拍卖单位纳税人识别号\r\n \"jyPmMc\": \"\", //经营、拍卖单位纳税人识别号\r\n \"jyPmDz\": \"\", //经营、拍卖单位地址\r\n \"jyPmDh\": \"\", //经营、拍卖单位电话\r\n \"jyPmYhzh\": \"\", //经营、拍卖单位开户银行账号\r\n \"escSbh\": \"91**********1J\", //二手车市场识别号\r\n \"escMc\": \"天津********公司\", //二手车市场名称\r\n \"escDh\": \"02*******58\", //二手车市场电话\r\n \"escDz\": \"天津市********院内\", //二手车市场地址\r\n \"escYhzh\": \"天津农**********\", //二手车市场开户行账号\r\n \"bz\": \"\", //备注\r\n \"kpfLx\": null, //开票方类型:1经营单位 2拍卖单位 03二手车市场\r\n \"kpfNsrsbh\": null, //开票方纳税人识别号\r\n \"kpr\": null, //开票人\r\n \"kjlx\": \"1\", //开具类型标识:1自开 2代开 3代办退税\r\n \"zfr\": null, //作废人\r\n \"zfrq\": null, //作废日期\r\n \"fpztBz\": null, //发票状态标识:0正数票 1负数票 2空白作废发票 3正数作废发票 4负数作废发票\r\n \"bsNsrsbh\": null, //报税纳税人识别号\r\n \"sbbh\": \"\", //设备/机器编号:税控盘号、金税盘号\r\n \"zxbm\": null, //自行编码\r\n \"fpztDm\": \"0\" //发票状态代码\r\n }\r\n}\r\n\r\n\r\n查无此票返回样例\r\n{\r\n \"code\": 201, \r\n \"msg\": \"查无此票\", \r\n \"taskNo\": \"12552230716560623515\",\r\n \"data\": {\r\n \"fplx\": \"01\"\r\n }\r\n}\r\n\r\n不一致返回样例\r\n{\r\n \"code\": 202, \r\n \"msg\": \"不一致\", \r\n \"taskNo\": \"12552230716560623515\", \r\n \"data\": {\r\n \"fplx\": \"01\"\r\n }\r\n}\r\n\r\n发票类型列表:\r\n01\t增值税专用发票\r\n03\t机动车销售统一发票\r\n04\t增值税普通发票\r\n08\t增值税专用发票(电子)\r\n09\t全电发票\r\n0901\t全电纸质发票(增值税专用发票)\r\n0903\t全电纸质(机动车销售统一发票)\r\n0904\t全电纸质发票(增值税普通发票)\r\n0910\t电子发票(普通发票)\r\n0915\t全电纸质(二手车统一销售发票)\r\n0920\t电子发票(增值税专用发票)\r\n10\t增值税普通发票(电子)\r\n11\t增值税普通发票(卷式)\r\n14\t通行费发票\r\n15\t二手车发票\r\n83\t电子发票(铁路电子客票)\r\n61\t电子发票(航空运输电子客票行程单)"
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 工具/发票
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-297298817-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 联网搜索
Source: https://docs.agicto.com/api-reference/tools/search
POST /v1/tool/search
## Endpoint
```http theme={null}
POST /v1/tool/search
```
**分组**: 工具
## Headers
* `Authorization`: 必填 示例: `Bearer sk-`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"crawl_results": 0,
"max_results": 5,
"query": "小米",
"search_service": "bing"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/tool/search:
post:
summary: 联网搜索
deprecated: false
description: ''
tags:
- 工具
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
crawl_results:
type: integer
description: 需要爬取详情的内容数
max_results:
type: integer
description: 列表爬取数
query:
type: string
description: 搜索内容
search_service:
type: string
description: 搜索来源,bing或google
required:
- crawl_results
- max_results
- query
- search_service
x-apifox-orders:
- crawl_results
- max_results
- query
- search_service
example:
crawl_results: 0
max_results: 5
query: 小米
search_service: bing
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 工具
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282852115-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 视频解析
Source: https://docs.agicto.com/api-reference/tools/video-parse
POST /v1/tool/parseVideo
## Endpoint
```http theme={null}
POST /v1/tool/parseVideo
```
**分组**: 工具
## Headers
* `Authorization`: 必填 示例: `Bearer sk-`
* `Content-Type`: 必填 示例: `application/json`
## Request example
```json theme={null}
{
"url": "https://v.douyin.com/Gg_uyjQGVmE"
}
```
## Responses
* `200`: 成功
## OpenAPI specification
```yaml theme={null}
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/tool/parseVideo:
post:
summary: 视频解析
deprecated: false
description: ''
tags:
- 工具
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer sk-
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
url:
type: string
required:
- url
example:
url: https://v.douyin.com/Gg_uyjQGVmE
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 工具
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282837124-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
```
# 函数调用
Source: https://docs.agicto.com/guides/function-calling
使用模型生成结构化工具调用参数
函数调用适合让模型决定什么时候调用业务工具,例如查询订单、检索知识库、创建工单、调用搜索或执行内部动作。
AGICTO API 使用 OpenAI 兼容格式时,你可以沿用现有工具调用设计。具体可用参数取决于所选模型能力。
## 工作方式
你向模型提供工具名称、说明和 JSON 参数结构。
模型根据用户问题生成工具调用参数。
业务系统调用数据库、搜索、CRM 或内部 API。
模型根据工具结果生成最终回复。
## 请求示例
```bash theme={null}
curl https://api.agicto.cn/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"messages": [
{
"role": "user",
"content": "查询订单 A1001 的物流状态。"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_order_status",
"description": "查询订单物流状态",
"parameters": {
"type": "object",
"properties": {
"order_id": {
"type": "string",
"description": "订单编号"
}
},
"required": ["order_id"]
}
}
}
]
}'
```
## 设计建议
* 工具名称使用稳定的英文标识,例如 `get_order_status`。
* 参数结构尽量小,避免把业务文档塞进工具定义。
* 工具说明写清楚“什么时候用”,不要只写“查询工具”。
* 对模型生成的参数做服务端校验。
* 工具执行失败时,将失败原因作为工具结果返回给模型。
## 常见工具类型
| 工具 | 作用 |
| - | - |
| Search | 检索外部网页或内部知识库。 |
| Database | 查询订单、用户、库存和账单。 |
| Ticket | 创建、更新或查询工单。 |
| Action | 执行业务动作,例如退款、发券、发送通知。 |
查看 SDK 迁移和兼容格式说明。
# 图像生成
Source: https://docs.agicto.com/guides/image-generation
使用 AGICTO API 生成图片和创意视觉素材
图像生成适合头像、海报、商品图、插画、营销素材和产品视觉。你可以使用 OpenAI 兼容图片接口,也可以使用 Midjourney 等专用接口。
## 选择接口
| 场景 | 推荐接口 |
| - | - |
| 统一 OpenAI 兼容格式 | `/v1/images/generations` |
| 高质量创意图像 | `/v1/mj/submit/imagine` |
| Midjourney 变体、放大、重绘 | `/v1/mj/submit/action` |
| 查询 Midjourney 任务 | `/mj/task/{result}/fetch` |
## OpenAI 兼容图片
```bash theme={null}
curl https://api.agicto.cn/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"prompt": "A clean product illustration for an API dashboard",
"size": "1024x1024"
}'
```
## Midjourney 图片
```bash theme={null}
curl https://api.agicto.cn/v1/mj/submit/imagine \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A futuristic API control center, clean UI, premium product render"
}'
```
## Prompt 建议
* 写清主体、风格、用途和画幅。
* 商品图要说明背景、光线和构图。
* UI 插画要说明品牌色和使用位置。
* 需要稳定产出时保留固定模板。
查看 OpenAI 兼容图片接口。
查看 Midjourney 任务创建接口。
# 模型厂商
Source: https://docs.agicto.com/guides/model-providers
按模型来源理解 AGICTO API 的厂商筛选
厂商筛选不是品牌陈列。它的作用是帮你缩小选择范围:你可以按生态、模型能力、中文表现、图像质量、视频能力或成本偏好选择模型来源。
Open AI、Google、Anthropic、DeepSeek、豆包、智谱、小米等。
Midjourney、可灵、Vidu、豆包、Google、Open AI 等。
Cohere、百度、Open AI、Google 等向量和排序模型。
## 厂商地图
| 层级 | 厂商 | 你通常会为了什么选择它 |
| - | - | - |
| 国际通用 | Open AI、Google、Anthropic、Mistral、Meta AI、Xai | 通用对话、代码、多模态、长上下文、OpenAI 兼容迁移。 |
| 中文主力 | DeepSeek、豆包、智谱、阿里、腾讯、百度、讯飞、百川、360、零一万物、月之暗面、MiniMax、蚂蚁百灵、小米 | 中文生成、代码、长文档、企业应用、本土多媒体能力。 |
| 图像创作 | Midjourney、Open AI、Google、豆包、阿里 | 海报、插画、商品图、头像和创意视觉。 |
| 视频生成 | 可灵、Vidu、豆包、Google、Open AI、阿里 | 文生视频、图生视频、短视频素材和官方视频格式任务。 |
| 检索增强 | Cohere、Open AI、Google、百度 | Embedding、Rerank、RAG 和企业搜索。 |
| 研究与开源 | allenai、Meta AI、Mistral | 开源模型、研究模型和轻量部署参考。 |
## 当前厂商
AGICTO 模型列表当前包含这些厂商:
`Open AI`、`百度`、`讯飞`、`百川`、`阿里`、`腾讯`、`360`、`Google`、`Anthropic`、`Mistral`、`Meta AI`、`allenai`、`零一万物`、`月之暗面`、`豆包`、`DeepSeek`、`Cohere`、`MiniMax`、`Midjourney`、`智谱`、`Xai`、`可灵`、`Vidu`、`蚂蚁百灵`、`小米`
完整厂商、实时模型和价格以 模型列表 为准。
## 怎么用厂商筛选
先选文本、图像、向量、排序、音频、全模态、视频或工具。用途决定接口。
选择你偏好的厂商。例如迁移 OpenAI 生态时选 Open AI,中文代码任务可比较 DeepSeek 和小米,视频任务可比较可灵、Vidu、豆包和 Google。
长输入看上下文长度和输入价格。长输出看输出价格。视频任务看时长、尺寸和任务格式。
将模型名复制到 `model` 字段。不要把厂商名当成模型名。
## 厂商不是接口
同一个厂商可能有文本、图像、音频和视频模型。接口由模型类型决定。
| 如果模型属于 | 使用 |
| - | - |
| 文本 | `/v1/chat/completions` |
| 图像 | `/v1/images/generations` 或图片专用接口 |
| Midjourney | `/v1/mj/submit/imagine` |
| 向量 | `/v1/embeddings` |
| 排序 | `/v1/rerank` |
| OpenAI 兼容视频 | `/v1/videos` |
| 官方视频格式 | `/v1/videos/create/{provider}` |
调用前确认两件事:模型类型匹配接口,模型名填入 `model` 字段。厂商名不能替代模型名。
## 推荐入口
了解模型类型、价格字段和调用方式。
按厂商、用途和价格筛选实时模型。
# 如何选择模型
Source: https://docs.agicto.com/guides/model-selection
用一套决策流程选择 AGICTO API 模型
选模型不要从厂商开始。先从任务开始,再看质量、成本、速度和上下文长度。
## 30 秒选型
选一个低成本文本模型,先调用 `/v1/chat/completions`。
优先看文本模型、代码能力、上下文长度和输出价格。
使用 Embedding 做召回,再用 Rerank 提升结果排序。
图片走图像接口,视频走任务流程。先确认模型类型和接口格式。
## 决策矩阵
| 场景 | 优先级 | 选择建议 |
| - | - | - |
| 首次接入 | 成功率、低成本 | 选低成本文本模型,先验证 API Key、Base URL 和请求格式。 |
| 客服和问答 | 成本、稳定性、中文表现 | 选中文表现稳定、输出价格可控的文本模型。 |
| 代码生成 | 代码能力、上下文长度 | 选代码能力强的文本模型。长仓库任务要看上下文长度。 |
| 长文档处理 | 上下文长度、输入价格 | 选长上下文模型,并减少无关输入。 |
| RAG | 向量质量、排序质量 | Embedding 负责召回,Rerank 负责精排。 |
| 图片生成 | 画面质量、风格控制 | 创意视觉可看 Midjourney。OpenAI 兼容图片适合统一接口。 |
| 视频生成 | 任务格式、时长、尺寸 | 先选择 OpenAI 兼容视频或官方视频格式,再选模型。 |
| 成本敏感批处理 | 输入 / 输出价格 | 选择 mini、lite、flash 或轻量模型,并限制输出长度。 |
## 推荐流程
文本用 `/v1/chat/completions`,向量用 `/v1/embeddings`,排序用 `/v1/rerank`,图片用 `/v1/images/generations`,视频用 `/v1/videos` 或官方视频接口。
在 模型列表 中按文本、图像、向量、排序、音频、全模态、视频或工具筛选。
需要生态兼容时看 Open AI。需要中文、代码或本土能力时比较 DeepSeek、豆包、智谱、阿里、小米等。需要视频时比较可灵、Vidu、豆包、Google、Open AI。
输入很长时看输入价格。输出很长时看输出价格。视频任务看时长、尺寸和任务价格。
用少量请求验证质量、延迟和失败率,再扩大调用量。
## 模型名应该可替换
生产环境建议把模型名放在配置里。
```env theme={null}
AGICTO_CHAT_MODEL=MODEL_NAME
AGICTO_EMBEDDING_MODEL=MODEL_NAME
AGICTO_RERANK_MODEL=MODEL_NAME
AGICTO_IMAGE_MODEL=MODEL_NAME
AGICTO_VIDEO_MODEL=MODEL_NAME
```
调用时读取配置:
```js theme={null}
const completion = await client.chat.completions.create({
model: process.env.AGICTO_CHAT_MODEL,
messages: [
{
role: "user",
content: "总结这段文本。"
}
]
});
```
## 常见错误
`Open AI`、`Google`、`DeepSeek` 是厂商或筛选项,不一定是可调用的 `model`。请从模型列表复制完整模型名。
图片模型不能放进 `/v1/chat/completions`。视频模型通常需要任务接口。向量模型要用 `/v1/embeddings`。
成本由模型单价、输入长度、输出长度和调用次数共同决定。长上下文任务尤其要关注输入价格。
# 模型广场
Source: https://docs.agicto.com/guides/models
在 AGICTO API 中选择模型、查看价格,并把模型名用于请求
AGICTO API 聚合文本、图像、视频、音频、向量、排序、全模态和工具能力。你不用先记住所有模型。先确定任务,再从模型列表复制 `model` 名。
查看实时模型、价格、上下文长度和厂商筛选。
了解 Open AI、Google、Anthropic、DeepSeek、豆包、可灵、Vidu 等模型来源。
按成本、速度、上下文、代码、图像和视频任务选择模型。
## 先选任务
对话、代码生成、摘要、翻译、分类和结构化输出。使用 `/v1/chat/completions`。
海报、头像、插画、商品图和视觉素材。使用 `/v1/images/generations` 或图片专用接口。
文生视频、图生视频、任务查询和结果下载。使用 `/v1/videos` 或官方视频接口。
RAG、语义搜索和知识库召回。使用 `/v1/embeddings`,必要时配合 `/v1/rerank`。
TTS、语音生成和音频相关能力。按具体音频接口传入模型。
联网搜索、热榜、视频解析、发票查验和发票 OCR。使用 `/v1/tool/*`。
## 再看四个字段
| 字段 | 决策价值 |
| - | - |
| `model` | 复制到请求体。模型名决定实际调用的能力。 |
| 类型 | 决定你应该调用哪个接口。文本、图像、视频、向量和工具不能混用。 |
| 上下文长度 | 决定能放多少历史消息、文档、代码或检索内容。 |
| 输入 / 输出价格 | 决定成本。长输入看输入价格,长回复看输出价格。 |
如果你还不确定模型,先用低成本文本模型跑通 `/v1/chat/completions`。确认链路可用后,再切换到更强模型或专用模型。
## 复制模型名后这样用
```bash theme={null}
curl https://api.agicto.cn/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"messages": [
{
"role": "user",
"content": "请用一句话说明这个模型适合什么任务。"
}
]
}'
```
## 模型和接口的对应关系
| 模型类型 | 接口 | 典型结果 |
| - | - | - |
| 文本 | `/v1/chat/completions` | 一段回复、代码、JSON 或结构化文本 |
| 向量 | `/v1/embeddings` | 向量数组 |
| 排序 | `/v1/rerank` | 重排后的候选结果 |
| 图像 | `/v1/images/generations` | 图片 URL 或图片结果 |
| Midjourney | `/v1/mj/submit/imagine` | 图片任务 ID |
| 视频 | `/v1/videos` | 视频任务 ID 和任务状态 |
| 工具 | `/v1/tool/*` | 搜索、热榜、OCR 或解析结果 |
## 一个更稳的生产配置
不要把模型名散落在业务代码里。把模型作为配置项,方便按成本、效果和可用性切换。
```env theme={null}
AGICTO_API_KEY=your_api_key
AGICTO_BASE_URL=https://api.agicto.cn/v1/
AGICTO_CHAT_MODEL=MODEL_NAME
AGICTO_IMAGE_MODEL=MODEL_NAME
AGICTO_VIDEO_MODEL=MODEL_NAME
```
如果你正在做具体业务,按任务场景选择模型。
# OpenAI 兼容格式
Source: https://docs.agicto.com/guides/openai-compatible
用 OpenAI SDK 和请求格式调用 AGICTO API
AGICTO API 支持 OpenAI 兼容格式。你可以复用现有 OpenAI SDK、请求体结构和多数调用流程,只需要把 Base URL、API Key 和模型名切换到 AGICTO API。
## 迁移清单
| 项目 | OpenAI | AGICTO API |
| - | - | - |
| Base URL | `https://api.openai.com/v1` | `https://api.agicto.cn/v1/` |
| API Key | OpenAI API Key | AGICTO API Key |
| Header | `Authorization: Bearer $API_KEY` | `Authorization: Bearer $API_KEY` |
| 请求格式 | OpenAI 格式 | OpenAI 兼容格式 |
如果你的 SDK 支持自定义 `baseURL` 或 `base_url`,优先用 SDK 接入。这样可以保留已有的重试、类型和流式处理逻辑。
## Chat completions
使用 `/v1/chat/completions` 生成对话回复、摘要、翻译、分类和代码。
```bash theme={null}
curl https://api.agicto.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "请用三点总结这段文本。"
}
]
}'
```
查看接口细节:Chat completions
## Embeddings
使用 `/v1/embeddings` 将文本转换为向量。常见用途包括语义搜索、推荐、聚类和 RAG 检索。
```bash theme={null}
curl https://api.agicto.cn/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "text-embedding-ada-002",
"input": "AGICTO API supports OpenAI-compatible requests.",
"encoding_format": "float"
}'
```
查看接口细节:创建嵌入
## Images
使用 `/v1/images/generations` 生成图片。你可以按模型能力传入 `prompt`、`size` 等参数。
```bash theme={null}
curl https://api.agicto.cn/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "gpt-image-1",
"prompt": "A clean product illustration for an API dashboard",
"size": "1024x1024"
}'
```
查看接口细节:图片生成
## Videos
使用 `/v1/videos` 创建 OpenAI 兼容格式的视频任务。创建任务后,使用返回的 `id` 查询状态。
```bash theme={null}
curl https://api.agicto.cn/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-F "model=sora-2-vip" \
-F "prompt=一只机械手臂在实验室中组装芯片,电影感镜头" \
-F "seconds=8" \
-F "size=1280x720"
```
查看接口细节:视频任务流程
## 常见迁移问题
* 如果返回认证错误,确认 Header 是 `Authorization: Bearer $API_KEY`。
* 如果返回模型不可用,确认 `model` 是你账户支持的模型名。
* 如果 OpenAI SDK 报路径错误,确认 Base URL 是否包含 `/v1`。
* 如果请求图片或视频,确认你的请求格式是 JSON 还是 `multipart/form-data`。
# 流式输出
Source: https://docs.agicto.com/guides/streaming
使用 AGICTO API 以 OpenAI 兼容格式返回增量内容
流式输出适合聊天窗口、代码生成、长文本写作和 Agent 工作流。用户可以更早看到结果,应用也能边接收边渲染。
## 使用场景
逐字展示回复,降低用户等待感。
边生成边展示代码,适合 IDE 和命令行工具。
输出较长时避免用户等待完整响应。
将模型输出逐步交给前端、日志或任务编排层。
## 请求示例
在 OpenAI 兼容格式中,将 `stream` 设置为 `true`。
```bash theme={null}
curl https://api.agicto.cn/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"stream": true,
"messages": [
{
"role": "user",
"content": "请写一段 100 字以内的产品介绍。"
}
]
}'
```
## Node.js 示例
```js theme={null}
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AGICTO_API_KEY,
baseURL: "https://api.agicto.cn/v1/"
});
const stream = await client.chat.completions.create({
model: process.env.AGICTO_CHAT_MODEL,
stream: true,
messages: [
{
role: "user",
content: "请用三句话介绍 AGICTO API。"
}
]
});
for await (const chunk of stream) {
const content = chunk.choices?.[0]?.delta?.content;
if (content) {
process.stdout.write(content);
}
}
```
## 处理建议
* 前端按增量内容追加渲染。
* 后端保留超时和重试策略。
* 日志中不要记录完整 API Key。
* 如果你需要 JSON 严格结构,优先使用非流式请求验证格式。
查看会话模型接口参数。
# 故障排查
Source: https://docs.agicto.com/guides/troubleshooting
排查 AGICTO API 调用中的认证、余额、限速和任务问题
当请求失败时,先按下面顺序检查。这样通常能最快定位问题。
## 请求无法认证
确认请求 Header 使用 Bearer Token。
```http theme={null}
Authorization: Bearer $API_KEY
```
常见原因:
* API Key 为空、复制不完整或包含多余空格
* Header 写成了 `Token`、`Basic` 或其他格式
* 在 OpenAI SDK 中仍然使用旧的环境变量
* 在浏览器前端直接暴露 API Key
## Base URL 错误
AGICTO API 的 Base URL 是:
```text theme={null}
https://api.agicto.cn/v1/
```
直接复制控制台里显示的 Base URL。不要漏写 `/v1`,也不要重复写成 `/v1/v1`。
## 余额或额度不足
调用前可以查询账户余额。
```bash theme={null}
curl https://api.agicto.cn/v1/enterprise/account \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"uuid": "YOUR_ACCOUNT_UUID"
}'
```
查看接口细节:账户余额查询
## 模型名不可用
确认 `model` 使用的是你账户支持的模型名。不同接口支持的模型不同,例如:
* Chat completions 使用会话模型
* Embeddings 使用嵌入模型
* Images 使用图片模型
* Videos 使用视频模型
如果你从其他平台迁移,先替换模型名,再复用原来的请求结构。
## 视频任务没有结果
视频任务需要轮询状态。创建任务后,保存响应中的 `id`,再调用查询接口。
```bash theme={null}
curl https://api.agicto.cn/v1/videos/{id} \
-H "Authorization: Bearer $API_KEY"
```
如果任务还在处理中,请等待后重试。不要在短时间内过高频率轮询。
## 请求体格式不匹配
不同接口使用不同 Content-Type:
| 场景 | Content-Type |
| - | - |
| 聊天、嵌入、图片、工具 | `application/json` |
| OpenAI 兼容视频创建 | `multipart/form-data` |
| 文件或参考图上传 | `multipart/form-data` |
如果你收到参数缺失或解析失败,先检查请求体格式。
# 视频任务流程
Source: https://docs.agicto.com/guides/video-workflow
创建、查询和下载 AGICTO API 视频任务
视频生成通常是异步任务。你需要先创建任务,再轮询任务状态,最后下载或读取结果。
## 选择接口格式
AGICTO API 提供两类视频接口:
| 类型 | 适合场景 | 文档入口 |
| - | - | - |
| OpenAI 兼容格式 | 你希望统一使用 `/v1/videos` 工作流 | 创建视频 |
| 官方视频格式 | 你要使用豆包、万相、海螺、可灵等供应商参数 | 豆包视频 |
## OpenAI 兼容格式流程
调用 `POST /v1/videos`。请求使用 `multipart/form-data`。
响应中会返回 `id`。后续查询和下载都需要使用这个值。
调用 `GET /v1/videos/{id}`,直到任务进入完成状态。
调用 `GET /v1/videos/{id}/content` 获取视频内容。
## 创建视频
```bash theme={null}
curl https://api.agicto.cn/v1/videos \
-H "Authorization: Bearer $API_KEY" \
-F "model=sora-2-vip" \
-F "prompt=一辆电动汽车驶过未来城市街道,雨夜霓虹,电影感" \
-F "seconds=8" \
-F "size=1280x720"
```
## 查询视频
```bash theme={null}
curl https://api.agicto.cn/v1/videos/video_fe6f922f-da34-48a4-9c35-e71df5950cbf \
-H "Authorization: Bearer $API_KEY"
```
## 下载视频
```bash theme={null}
curl https://api.agicto.cn/v1/videos/video_fe6f922f-da34-48a4-9c35-e71df5950cbf/content \
-H "Authorization: Bearer $API_KEY" \
--output result.mp4
```
## 官方视频格式
如果你需要供应商专有参数,使用官方视频格式接口:
创建豆包视频任务并查询结果。
创建万相视频任务并查询结果。
创建海螺视频任务并查询结果。
使用可灵文生视频、图生视频和视频生音效接口。
# 视觉理解
Source: https://docs.agicto.com/guides/vision
使用 AGICTO API 处理图片输入和多模态任务
视觉理解适合图片问答、截图分析、票据识别、商品图理解、内容审核和多模态 Agent。
## 适合做什么
让模型根据图片内容回答问题。
分析 UI、报错页面、数据图表和产品截图。
结合发票 OCR、表格理解和结构化抽取。
识别图片主体、属性、风险和质量问题。
## OpenAI 兼容格式示例
```bash theme={null}
curl https://api.agicto.cn/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_NAME",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "请描述这张图片,并提取其中的重要信息。"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.png"
}
}
]
}
]
}'
```
## 使用建议
* 图片 URL 需要能被服务端访问。
* 大图先压缩到业务可接受的清晰度。
* 如果你要稳定提取字段,要求模型返回 JSON,并在服务端校验。
* 发票场景优先使用专用发票 OCR 或发票查验接口。
查看图像会话接口。
使用专用工具识别发票。
# AGICTO API 文档
Source: https://docs.agicto.com/index
使用 AGICTO API 调用模型、图片、视频、工具和语音接口
AGICTO API 让你通过统一的 Base URL 和 API Key 调用模型能力。你可以使用 OpenAI 兼容格式接入聊天、嵌入、图片和视频接口,也可以按任务调用 Midjourney、联网搜索、发票识别、TTS 和官方视频接口。
从 API Key、Base URL 到第一条 Chat completions 请求。
迁移 OpenAI SDK,最少只改 API Key、Base URL 和模型名。
查看模型类型、价格字段、上下文长度和选型建议。
## 你可以完成什么
使用 `/v1/chat/completions` 构建对话、代码生成和文本处理功能。
让聊天、代码和长文本生成边返回边渲染。
让模型生成结构化工具参数,接入你的业务系统。
处理图片问答、截图分析、票据和多模态任务。
按成本、速度、上下文、代码、图像和视频场景选择模型。
按 OpenAI、Google、DeepSeek、豆包、可灵、Vidu 等厂商理解模型来源。
使用 OpenAI 兼容格式或专用图片接口生成图片。
创建视频任务、轮询状态,并在完成后下载结果。
查看已实测的 AGICTO API 基础接口,以及待端到端验证的工具配置。
调用账户接口,确认调用前的余额状态。
查看从 Apifox 同步的完整接口列表和请求示例。
处理 API Key、余额、限速、模型名和任务状态问题。
## 应用集成
在 LangChain 中配置 AGICTO API 的 OpenAI 兼容模型。
在 Dify 中添加 OpenAI-compatible 模型供应商。
将 AGICTO API 配置为 OpenAI API 连接。
用可视化节点构建聊天、RAG 和自动化工作流。
## 调用前你需要知道
所有公共接口都围绕这三项展开:
* **Base URL**:`https://api.agicto.cn/v1/`
* **API Key**:在请求 Header 中使用 `Authorization: Bearer $API_KEY`
* **OpenAI 兼容格式**:优先用于聊天、嵌入、图片和视频等常见场景
如果你已经有 OpenAI SDK 项目,先读 OpenAI 兼容格式。你通常只需要替换 Base URL、API Key 和模型名。
## 推荐阅读顺序
跟随 快速开始 创建请求,并确认你的 API Key 可以正常工作。
如果你已有 OpenAI SDK 项目,使用 OpenAI 兼容格式。如果你还没确定模型,先读 如何选择模型。
在 API reference 中查看每个接口的 method、path、Header 和请求体。
# Dify 集成
Source: https://docs.agicto.com/integrations/dify
在 Dify 中配置 AGICTO API 的 OpenAI 兼容模型
你可以在 Dify 中添加 OpenAI 兼容模型供应商,并使用 AGICTO API 调用模型。Dify 的模型供应商配置使用 `API Base` 字段,不需要填写 `/v1` 路径。
## 配置值
| 字段 | 值 |
| - | - |
| 供应商 | OpenAI-compatible |
| 凭据名称 | `agicto` 或便于团队识别的名称 |
| API Key | 你的 AGICTO API Key |
| 组织 ID | 留空 |
| API Base | `https://api.agicto.cn` |
| 验证模型 | 从模型列表复制的模型名,例如 `gpt-5.5` |
| API 协议 | Chat Completions |
## 配置步骤
在 Dify 控制台进入 **Settings**,然后打开 **模型供应商**。
在模型列表中找到 **OpenAI-compatible**,点击 **添加 API 密钥** 或 **配置**。
凭据名称填 `agicto`,API Key 填你的 AGICTO API Key,组织 ID 留空。
API Base 填 `https://api.agicto.cn`。从 模型列表 复制模型名,填入验证模型。
API 协议选择 **Chat Completions**,然后点击 **保存**。
创建一个简单应用,发送一条测试消息确认调用成功。
## 排查
* 如果认证失败,检查 API Key 是否完整。
* 如果模型不可用,检查模型名是否从模型列表复制。
* 如果路径错误,确认 Dify 的 API Base 是否为 `https://api.agicto.cn`,不要在该字段中追加 `/v1`。
* 如果协议错误,确认 API 协议选择 **Chat Completions**。
* 如果响应慢,先换低成本模型测试链路。
按 Dify 应用场景选择聊天、向量和排序模型。
# Flowise 集成
Source: https://docs.agicto.com/integrations/flowise
在 Flowise 中使用 AGICTO API 构建可视化 AI 工作流
Flowise 可以通过 OpenAI 兼容节点接入 AGICTO API。适合构建聊天、RAG、工具调用和自动化工作流。
## 配置值
| 字段 | 值 |
| - | - |
| API Key | AGICTO API Key |
| Base Path / Base URL | `https://api.agicto.cn/v1/` |
| Model Name | 从模型列表复制的模型名 |
## 配置步骤
在 Flowise 中选择 OpenAI 或 ChatOpenAI 兼容节点。
将 API Key 设置为 AGICTO API Key。
将 Base URL 或 Base Path 设置为 `https://api.agicto.cn/v1/`。
从模型列表复制模型名,填入 Model Name。
发送一个简单问题,确认节点返回结果。
## 常见组合
ChatOpenAI + Memory + Prompt Template。
Embeddings + Vector Store + Retriever + ChatOpenAI。
查看 AGICTO API 的兼容格式和 SDK 配置。
# LangChain 集成
Source: https://docs.agicto.com/integrations/langchain
在 LangChain 中通过 OpenAI 兼容格式使用 AGICTO API
LangChain 可以通过 OpenAI 兼容客户端连接 AGICTO API。你只需要配置 API Key、Base URL 和模型名。
## 安装
```bash theme={null}
npm install @langchain/openai @langchain/core
```
## Node.js 示例
```js theme={null}
import { ChatOpenAI } from "@langchain/openai";
const model = new ChatOpenAI({
apiKey: process.env.AGICTO_API_KEY,
model: process.env.AGICTO_CHAT_MODEL,
configuration: {
baseURL: "https://api.agicto.cn/v1/"
}
});
const result = await model.invoke("请用一句话介绍 AGICTO API。");
console.log(result.content);
```
## Python 示例
```bash theme={null}
pip install langchain-openai
```
```python theme={null}
import os
from langchain_openai import ChatOpenAI
model = ChatOpenAI(
api_key=os.environ["AGICTO_API_KEY"],
base_url="https://api.agicto.cn/v1/",
model=os.environ["AGICTO_CHAT_MODEL"],
)
result = model.invoke("请用一句话介绍 AGICTO API。")
print(result.content)
```
## 配置项
| 字段 | 值 |
| - | - |
| API Key | AGICTO API Key |
| Base URL | `https://api.agicto.cn/v1/` |
| Model | 从模型列表复制的模型名 |
查看模型类型、厂商和模型名使用方式。
# Open WebUI 集成
Source: https://docs.agicto.com/integrations/open-webui
在 Open WebUI 中配置 AGICTO API
Open WebUI 支持 OpenAI 兼容 API。你可以将 AGICTO API 配置为 OpenAI API 连接。
## 配置值
| 字段 | 值 |
| - | - |
| OpenAI API Key | 你的 AGICTO API Key |
| OpenAI API Base URL | `https://api.agicto.cn/v1/` |
| Model | 从模型列表复制的模型名 |
## 配置步骤
进入 Open WebUI 的 **Admin Panel** 或 **Settings**。
找到 OpenAI API 连接配置。
Base URL 填 `https://api.agicto.cn/v1/`,API Key 填 AGICTO API Key。
添加你要使用的模型名,然后发送一条消息测试。
## 建议
* 先用一个文本模型测试聊天。
* 多用户环境中不要把 API Key 暴露给普通用户。
* 如果你启用了 RAG,额外配置 Embedding 模型。
查看聊天模型和向量模型的选择方式。
# 快速开始
Source: https://docs.agicto.com/quickstart
用 AGICTO API 发起第一次 OpenAI 兼容格式调用
本页帮你用 OpenAI 兼容格式发出第一条 AGICTO API 请求。完成后,你会知道 API Key 放在哪里、Base URL 怎么写,以及如何验证响应是否成功。
## 前置条件
* 你已经有 AGICTO API 的 API Key
* 你的账户有可用余额或额度
* 你的运行环境可以访问 AGICTO API
如果你只是想快速验证连通性,先使用 Chat completions。它最适合作为第一次调用。
## 1. 设置 API Key
调用接口时,将 API Key 放在 `Authorization` Header 中。
```http theme={null}
Authorization: Bearer $API_KEY
```
不要在客户端代码、公开仓库或日志中暴露 API Key。
## 2. 使用 Base URL
AGICTO API 的 Base URL 是:
```text theme={null}
https://api.agicto.cn/v1/
```
直接复制控制台里显示的 Base URL。示例请求会使用完整地址。
本页使用 Chat completions,完整请求地址是:
```text theme={null}
https://api.agicto.cn/v1/chat/completions
```
## 3. 发送第一条 Chat 请求
复制下面的命令,将 `$API_KEY` 替换为你的 API Key,将 `model` 替换为你账户可用的模型名。
```bash theme={null}
curl https://api.agicto.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "你好,请用一句话介绍 AGICTO API。"
}
]
}'
```
成功时,接口会返回模型生成的消息。失败时,先检查 API Key、余额、模型名和请求 JSON。
## 4. 使用 OpenAI SDK
如果你已经在项目中使用 OpenAI SDK,可以把客户端的 Base URL 改为控制台显示的 Base URL。
```js Node.js theme={null}
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AGICTO_API_KEY,
baseURL: "https://api.agicto.cn/v1/"
});
const completion = await client.chat.completions.create({
model: "gpt-4o",
messages: [
{
role: "user",
content: "你好,请用一句话介绍 AGICTO API。"
}
]
});
console.log(completion.choices[0].message.content);
```
```python Python theme={null}
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AGICTO_API_KEY"],
base_url="https://api.agicto.cn/v1/",
)
completion = client.chat.completions.create(
model="gpt-4o",
messages=[
{
"role": "user",
"content": "你好,请用一句话介绍 AGICTO API。",
}
],
)
print(completion.choices[0].message.content)
```
## 5. 下一步
查看模型类型、价格字段和模型名复制方式。
查看聊天、嵌入、图片和视频的迁移方式。
调用余额接口,确认账户可用额度。
查看完整接口列表和 Apifox 同步示例。
让聊天应用边生成边显示。
按错误现象定位 API Key、余额、限速和模型问题。