AnyInt Gateway Developer APIOpenAPI 3.1.0合约版本 0.1.0
API 参考
使用同一个网关和 API 密钥接入兼容 OpenAI、Anthropic、Gemini 与异步媒体的工作流。
- 服务器
https://api.anyint.ai提供此 OpenAPI 文档的 AnyInt Gateway 地址。
只读参考
此页面不会收集 API 密钥或发送请求。请在你自己的安全环境中运行示例。
74 个端点
ChatRoom 集成
3 个端点为独立 ChatRoom 客户端查询当前密钥可用的模型与企业功能。
使用开发者 API 密钥认证的永久 ChatRoom 集成接口,不受旧版兼容开关和到期时间影响。遵循租户及密钥可见性,保留迁移后的稳定归属引用,不调用旧核心。身份会话须先通过已认证的 BFF 产品凭据接口获取执行凭据。
GET /v1/chatroom/models请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/models?scope=<scope>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| scope | query | string | 必填 | — |
| limit | query | integer | 可选 | —示例: 1000 |
响应
200成功;响应不缓存
application/json
示例
{
"success": true,
"data": {
"models": [],
"total": 0
}
}使用开发者 API 密钥认证的永久 ChatRoom 集成接口,不受旧版兼容开关和到期时间影响。遵循租户及密钥可见性,保留迁移后的稳定归属引用,不调用旧核心。身份会话须先通过已认证的 BFF 产品凭据接口获取执行凭据。
GET /v1/chatroom/enterprise-context请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/enterprise-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功;响应不缓存
application/json
示例
{
"success": true,
"data": {
"featureControls": {
"seedanceAuthorizedAssets": false
}
}
}使用开发者 API 密钥认证的永久 ChatRoom 集成接口,不受旧版兼容开关和到期时间影响。遵循租户及密钥可见性,保留迁移后的稳定归属引用,不调用旧核心。身份会话须先通过已认证的 BFF 产品凭据接口获取执行凭据。
GET /v1/chatroom/key-context请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/key-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功;响应不缓存
application/json
示例
{
"success": true,
"data": {
"userId": "user_example",
"apiKeyId": "key_example",
"featureControls": {
"seedanceAuthorizedAssets": false
}
}
}对话
2 个端点创建兼容 OpenAI 的对话响应。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/chat/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}响应
200成功
application/json
示例
{
"id": "chatcmpl_example",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Edge computing processes data near its source, reducing latency and bandwidth use."
},
"finish_reason": "stop"
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/chat/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}响应
200成功
application/json
示例
{
"id": "chatcmpl_example",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Edge computing processes data near its source, reducing latency and bandwidth use."
},
"finish_reason": "stop"
}
]
}响应
2 个端点使用 OpenAI Responses API 结构创建响应。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/responses' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "Write a short welcome message."
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"input": "Write a short welcome message."
}响应
200成功
application/json
示例
{
"id": "resp_example",
"object": "response",
"status": "completed"
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/responses' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "Write a short welcome message."
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"input": "Write a short welcome message."
}响应
200成功
application/json
示例
{
"id": "resp_example",
"object": "response",
"status": "completed"
}文本补全
2 个端点创建兼容 OpenAI 的传统文本补全。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Once upon a time"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "Once upon a time"
}响应
200成功
application/json
示例
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Once upon a time"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "Once upon a time"
}响应
200成功
application/json
示例
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}嵌入
2 个端点从文本输入创建向量嵌入。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/embeddings' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/embeddings' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}内容审核
2 个端点识别可能有害的文本或图像输入。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/moderations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input": "Text to classify"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"input": "Text to classify"
}响应
200成功
application/json
示例
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/moderations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input": "Text to classify"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"input": "Text to classify"
}响应
200成功
application/json
示例
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}批处理
8 个端点在当前部署启用对象存储后,提交供应商原生 JSONL 批处理任务。
请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| after | query | string | 可选 | — |
| limit | query | integer | 可选 | —示例: 20 |
响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}
],
"first_id": "batch_example",
"last_id": "batch_example",
"has_more": false
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}响应
200成功
application/json
示例
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| after | query | string | 可选 | — |
| limit | query | integer | 可选 | —示例: 20 |
响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}
],
"first_id": "batch_example",
"last_id": "batch_example",
"has_more": false
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}响应
200成功
application/json
示例
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| batch_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| batch_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| batch_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| batch_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}文件
5 个端点上传、列出、查看和下载文件。
请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/files' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'file=@path/to/document.jsonl' \
--form 'purpose=batch'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填multipart/form-data
示例
{
"file": "document.jsonl",
"purpose": "batch"
}响应
200成功
application/json
示例
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| file_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}请求示例
cURL
curl \
--request DELETE \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| file_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "file_example",
"object": "file",
"deleted": true
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| file_id | path | string | 必填 | — |
响应
200二进制文件内容
application/octet-stream
示例
<binary>音频
3 个端点转写音频、将音频翻译为英语或合成语音。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/transcriptions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'file=@path/to/audio.wav' \
--form 'model=your-model-id'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填multipart/form-data
示例
{
"file": "audio.wav",
"model": "your-model-id"
}响应
200成功
application/json
示例
{
"text": "Example transcript."
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/translations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'file=@path/to/audio.wav' \
--form 'model=your-model-id'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填multipart/form-data
示例
{
"file": "audio.wav",
"model": "your-model-id"
}响应
200成功
application/json
示例
{
"text": "Example transcript."
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/speech' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: audio/mpeg' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"voice": "your-voice-id",
"input": "Welcome to AnyInt Gateway."
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"voice": "your-voice-id",
"input": "Welcome to AnyInt Gateway."
}响应
200二进制音频内容
audio/mpeg
示例
<binary>图像
4 个端点通过兼容 OpenAI 的请求生成和编辑图像。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/images/edits' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'image=@path/to/image.png' \
--form 'model=your-model-id' \
--form 'prompt=Add a soft blue background.'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填multipart/form-data
示例
{
"image": "image.png",
"model": "your-model-id",
"prompt": "Add a soft blue background."
}响应
200成功
application/json
示例
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/images/edits' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'image=@path/to/image.png' \
--form 'model=your-model-id' \
--form 'prompt=Add a soft blue background.'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填multipart/form-data
示例
{
"image": "image.png",
"model": "your-model-id",
"prompt": "Add a soft blue background."
}响应
200成功
application/json
示例
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/images/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}响应
200成功
application/json
示例
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/images/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}响应
200成功
application/json
示例
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}模型
4 个端点查看各协议可用的模型。
请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/anthropic/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功
application/json
示例
{
"data": [
{
"id": "your-model-id",
"type": "model",
"display_name": "Configured model",
"created_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": false,
"first_id": "your-model-id",
"last_id": "your-model-id"
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/gemini/v1beta/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功
application/json
示例
{
"models": [
{
"name": "models/your-model-id",
"displayName": "Configured model",
"supportedGenerationMethods": [
"generateContent"
],
"inputTokenLimit": 8192,
"outputTokenLimit": 8192
}
]
}异步媒体
26 个端点创建并查看异步图像、视频和音乐任务。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/videos' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}响应
200重复任务
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200生成的媒体内容
application/octet-stream
示例
<binary>请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/videos' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}响应
200重复任务
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/videos/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200生成的媒体内容
application/octet-stream
示例
<binary>请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/audio/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}响应
200重复任务
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/audio/generations/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200生成的媒体内容
application/octet-stream
示例
<binary>请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}响应
200重复任务
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/audio/generations/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200生成的媒体内容
application/octet-stream
示例
<binary>请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/suno/generate' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}响应
200重复任务
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/suno/query/task?taskId=<taskId>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| taskId | query | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/doubao/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/image-generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud"
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud"
}响应
200重复的异步任务
application/json
示例
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/video-generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}响应
200重复的异步任务
application/json
示例
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "video_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/videos/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}响应
200重复任务
application/json
示例
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "video_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/music-generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}响应
200重复的异步任务
application/json
示例
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "music_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/music/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}响应
200重复任务
application/json
示例
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "music_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。响应
200成功
application/json
示例
{
"object": "list",
"data": [
{
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"object": "generation_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"object": "generation_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
响应
200成功
application/json
示例
{
"object": "generation_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}请求示例
cURL
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>/artifacts/<artifact_id>?tenant_id=<tenant_id>&expires_at=<expires_at>&signature=<signature>' \
--header 'Accept: application/octet-stream'身份验证
无需身份验证
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| task_id | path | string | 必填 | — |
| artifact_id | path | string | 必填 | — |
| tenant_id | query | string | 必填 | — |
| expires_at | query | integer | 必填 | — |
| signature | query | string | 必填 | — |
响应
200二进制任务产物内容
application/octet-stream
示例
<binary>Anthropic 消息
2 个端点使用 Anthropic 原生消息、Token 统计和模型发现能力。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/anthropic/v1/messages' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}响应
200成功
application/json
示例
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/anthropic/v1/messages/count_tokens' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。请求体
必填application/json
示例
{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}响应
200成功
application/json
示例
{
"input_tokens": 12
}Gemini 内容
4 个端点使用 Gemini 原生内容生成与流式输出。
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>:generateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| model | path | string | 必填 | — |
请求体
必填application/json
示例
{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}响应
200成功
application/json
示例
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>:streamGenerateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| model | path | string | 必填 | — |
| alt | query | string | 可选 | — |
请求体
必填application/json
示例
{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}响应
200Gemini 内容流
text/event-stream
示例
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>/generateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| model | path | string | 必填 | — |
请求体
必填application/json
示例
{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}响应
200成功
application/json
示例
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}请求示例
cURL
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>/streamGenerateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'身份验证
ApiKeyAuth
http · bearer在 Authorization 请求头中以 Bearer 形式传递 AnyInt 开发者 API 密钥。参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| model | path | string | 必填 | — |
| alt | query | string | 可选 | — |
请求体
必填application/json
示例
{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}响应
200Gemini 内容流
text/event-stream
示例
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}