API 參考
在 OpenAI 相容、Anthropic、Gemini 和非同步媒體工作流程中使用單一閘道和 API 金鑰。
- 伺服器
https://api.anyint.ai提供此 OpenAPI 文件的 AnyInt Gateway 來源。
75 端點
ChatRoom 整合
4 端點為獨立 ChatRoom 用戶端查詢當前金鑰可用的模型與企業功能。
要求範例
curl \
--request POST \
--url 'https://api.anyint.ai/v1/tasks/request-costs' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"request_ids": [
"req_example:async"
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"request_ids": [
"req_example:async"
]
}回應
{
"request_costs": [
{
"request_id": "req_example:async",
"credits": 125
}
]
}使用开发者 API 金鑰认证的原生 ChatRoom 元数据。保留现有的租户/金鑰可见性及已导入的稳定素材所有权引用。
GET /v1/chatroom/models要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/models?scope=<scope>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| scope | query | string | 必要 | — |
| limit | query | integer | 選填 | —範例: 1000 |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"success": true,
"data": {
"models": [],
"total": 0
}
}使用开发者 API 金鑰认证的原生 ChatRoom 元数据。保留现有的租户/金鑰可见性及已导入的稳定素材所有权引用。
GET /v1/chatroom/enterprise-context要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/enterprise-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"success": true,
"data": {
"featureControls": {
"seedanceAuthorizedAssets": false,
"videoDramaUsage": {
"enabled": false,
"dramaNames": []
}
}
}
}使用开发者 API 金鑰认证的原生 ChatRoom 元数据。保留现有的租户/金鑰可见性及已导入的稳定素材所有权引用。
GET /v1/chatroom/key-context要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/key-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"success": true,
"data": {
"userId": "user_example",
"apiKeyId": "key_example",
"featureControls": {
"seedanceAuthorizedAssets": false,
"videoDramaUsage": {
"enabled": false,
"dramaNames": []
}
}
}
}聊天
2 端點建立 OpenAI 相容的對話式回應。
呼叫此端點以執行說明的操作。
POST /v1/chat/completions要求範例
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."
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}回應
{
"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"
}
]
}呼叫此端點以執行說明的操作。
POST /openai/v1/chat/completions要求範例
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."
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}回應
{
"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 格式建立回應。
呼叫此端點以執行說明的操作。
POST /v1/responses要求範例
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."
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"input": "Write a short welcome message."
}回應
{
"id": "resp_example",
"object": "response",
"status": "completed"
}呼叫此端點以執行說明的操作。
POST /openai/v1/responses要求範例
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."
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"input": "Write a short welcome message."
}回應
{
"id": "resp_example",
"object": "response",
"status": "completed"
}文字生成
2 端點建立舊版 OpenAI 相容的文字完成。
呼叫此端點以執行說明的操作。
POST /v1/completions要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Once upon a time"
}回應
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}呼叫此端點以執行說明的操作。
POST /openai/v1/completions要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Once upon a time"
}回應
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}嵌入
2 端點從文字輸入建立向量嵌入。
要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}回應
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}回應
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}審查
2 端點分類潛在有害的文字或圖片輸入。
要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"input": "Text to classify"
}回應
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"input": "Text to classify"
}回應
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}批次
8 端點當部署啟用物件儲存時,提交供應商原生的 JSONL 批次。
要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| after | query | string | 選填 | — |
| limit | query | integer | 選填 | —範例: 20 |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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
}Native prepaid batches validate the stored file checksum and strict JSONL before funding. Every item needs a server-owned execution policy for its pinned route and price, including file-upload and batch-create transport bounds. All item reservations commit atomically before provider submission; insufficient aggregate funds return HTTP 402 without submitting a partial batch. Incompatible provider configurations must be split into separate batches. Each submission permits one file upload and one batch create; an ambiguous submission returns batch_submission_recovery_required and retains funding without automatic resubmission. Failed, cancelled or missing item results do not prove zero provider cost and retain funding for reconciliation.
POST /v1/batches要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。要求內文
必要{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| after | query | string | 選填 | — |
| limit | query | integer | 選填 | —範例: 20 |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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
}Native prepaid batches validate the stored file checksum and strict JSONL before funding. Every item needs a server-owned execution policy for its pinned route and price, including file-upload and batch-create transport bounds. All item reservations commit atomically before provider submission; insufficient aggregate funds return HTTP 402 without submitting a partial batch. Incompatible provider configurations must be split into separate batches. Each submission permits one file upload and one batch create; an ambiguous submission returns batch_submission_recovery_required and retains funding without automatic resubmission. Failed, cancelled or missing item results do not prove zero provider cost and retain funding for reconciliation.
POST /openai/v1/batches要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。要求內文
必要{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| batch_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| batch_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request POST \
--url 'https://api.anyint.ai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| batch_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request POST \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| batch_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"object": "list",
"data": [
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}
]
}儲存內容前執行 API 金鑰的 IP 與每分鐘請求數策略。上傳與模型無關,不消耗推理配額。檔案在上傳 30 天後過期,除非透過 expires_after 設定更短的有效期(1 小時至 30 天);過期檔案不再出現在列表中、無法下載,並會被清除。每個租戶最多保留 10,000 個有效檔案,總大小不超過 10 GiB。
POST /openai/v1/files要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"file": "document.jsonl",
"purpose": "batch"
}回應
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| file_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}要求範例
curl \
--request DELETE \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| file_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"id": "file_example",
"object": "file",
"deleted": true
}要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| file_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
<binary>音訊
3 端點語音轉錄、將音訊翻譯成英文,或語音合成。
Native prepaid organizations reserve the greater of customer and provider maximum costs before audio provider dispatch. A missing or mismatched server-owned execution bound returns non-retryable HTTP 503 prepaid_execution_bound_unavailable. Multipart bounds include file sizes and content hashes. Insufficient funds return HTTP 402. Successful responses require the configured billable usage; missing required usage returns HTTP 502 and retains funding. Provider errors or unknown outcomes retain funding for audited recovery. Personal and postpaid audio behavior is preserved.
POST /openai/v1/audio/transcriptions要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"file": "audio.wav",
"model": "your-model-id"
}回應
{
"text": "Example transcript."
}Native prepaid organizations reserve the greater of customer and provider maximum costs before audio provider dispatch. A missing or mismatched server-owned execution bound returns non-retryable HTTP 503 prepaid_execution_bound_unavailable. Multipart bounds include file sizes and content hashes. Insufficient funds return HTTP 402. Successful responses require the configured billable usage; missing required usage returns HTTP 502 and retains funding. Provider errors or unknown outcomes retain funding for audited recovery. Personal and postpaid audio behavior is preserved.
POST /openai/v1/audio/translations要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"file": "audio.wav",
"model": "your-model-id"
}回應
{
"text": "Example transcript."
}Native prepaid organizations reserve the greater of customer and provider maximum costs before audio provider dispatch. A missing or mismatched server-owned execution bound returns non-retryable HTTP 503 prepaid_execution_bound_unavailable. Multipart bounds include file sizes and content hashes. Insufficient funds return HTTP 402. Successful responses require the configured billable usage; missing required usage returns HTTP 502 and retains funding. Provider errors or unknown outcomes retain funding for audited recovery. Personal and postpaid audio behavior is preserved.
POST /openai/v1/audio/speech要求範例
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."
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"voice": "your-voice-id",
"input": "Welcome to AnyInt Gateway."
}回應
<binary>圖像
4 端點通过兼容 OpenAI 的请求生成和编辑图像。
呼叫此端點以執行說明的操作。
POST /v1/images/edits要求範例
curl \
--request POST \
--url 'https://api.anyint.ai/v1/images/edits' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}回應
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}呼叫此端點以執行說明的操作。
POST /openai/v1/images/edits要求範例
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/images/edits' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}回應
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}呼叫此端點以執行說明的操作。
POST /v1/images/generations要求範例
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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}回應
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}呼叫此端點以執行說明的操作。
POST /openai/v1/images/generations要求範例
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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}回應
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}模型
4 端點探索透過各個通訊協定提供的模型。
要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/anthropic/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/gemini/v1beta/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"models": [
{
"name": "models/your-model-id",
"displayName": "Configured model",
"supportedGenerationMethods": [
"generateContent"
],
"inputTokenLimit": 8192,
"outputTokenLimit": 8192
}
]
}非同步媒體
23 端點建立並檢查非同步圖片、影片和音樂作業。
Seedance 支援有效的圖片與影片 asset:// 素材參照,包括混合的 reference_image 與 reference_video 內容。每個參照都必須屬於企業目前的素材庫。素材庫不相容的參照會在路由、建立任務或提交上游前回傳 HTTP 400 authorized_asset_provider_mismatch,retryable=false,user_action=simplify_input。請先在目前素材庫中登記所參照的圖片與影片並更新參照,然後重試。
POST /v1/videos要求範例
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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}回應
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
<binary>Seedance 支援有效的圖片與影片 asset:// 素材參照,包括混合的 reference_image 與 reference_video 內容。每個參照都必須屬於企業目前的素材庫。素材庫不相容的參照會在路由、建立任務或提交上游前回傳 HTTP 400 authorized_asset_provider_mismatch,retryable=false,user_action=simplify_input。請先在目前素材庫中登記所參照的圖片與影片並更新參照,然後重試。
POST /openai/v1/videos要求範例
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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}回應
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
<binary>要求範例
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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}回應
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
<binary>要求範例
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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}回應
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}要求範例
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'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
<binary>要求範例
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"
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud"
}回應
{
"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 \
--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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}回應
{
"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 \
--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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}回應
{
"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 \
--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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}回應
{
"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 \
--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
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request GET \
--url 'https://api.anyint.ai/v1/tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request POST \
--url 'https://api.anyint.ai/v1/tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| task_id | path | string | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"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 \
--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 | 必要 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
<binary>Anthropic 訊息
4 端點使用 Anthropic 原生的訊息、計數代幣和模型探索。
呼叫此端點以執行說明的操作。
POST /anthropic/v1/messages要求範例
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."
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}回應
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}要求範例
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"
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}回應
{
"input_tokens": 12
}呼叫此端點以執行說明的操作。
POST /v1/messages要求範例
curl \
--request POST \
--url 'https://api.anyint.ai/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."
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}回應
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}要求範例
curl \
--request POST \
--url 'https://api.anyint.ai/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"
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}回應
{
"input_tokens": 12
}Gemini 內容
4 端點使用 Gemini 原生的內容產生和串流。
呼叫此端點以執行說明的操作。
POST /gemini/v1beta/models/{model}:generateContent要求範例
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."
}
]
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| model | path | string | 必要 | — |
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}回應
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}呼叫此端點以執行說明的操作。
POST /gemini/v1beta/models/{model}:streamGenerateContent要求範例
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."
}
]
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| model | path | string | 必要 | — |
| alt | query | string | 選填 | — |
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}回應
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
呼叫此端點以執行說明的操作。
POST /gemini/v1beta/models/{model}/generateContent要求範例
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."
}
]
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| model | path | string | 必要 | — |
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}回應
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}呼叫此端點以執行說明的操作。
POST /gemini/v1beta/models/{model}/streamGenerateContent要求範例
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."
}
]
}
]
}'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| model | path | string | 必要 | — |
| alt | query | string | 選填 | — |
| X-Client-Message-Id | header | string | 選填 | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | 選填 | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | 選填 | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | 選填 | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
要求內文
必要{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}回應
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
其他端點 (Knowledge Crystallization)
1 端點Export crystallized AI conversation events for local Markdown notes sync.
要求範例
curl \
--request GET \
--url 'https://api.anyint.ai/v1/knowledge/export' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'驗證
http · bearer在 Authorization 標頭中,將 AnyInt 開發人員 API 金鑰作為 Bearer 權杖傳遞。參數
| 名稱 | 位置 | 類型 | 必要 | 說明 |
|---|---|---|---|---|
| cursor | query | string | 選填 | — |
| limit | query | integer | 選填 | — |
| collection_id | query | string | 選填 | — |
| X-Request-Id | header | string | 選填 | 可选的客户端关联 ID。有效值(8–128 个字母、数字、点、下划线、冒号或连字符)仅作为诊断哈希保留。此请求头不会对请求进行去重。每个 HTTP 请求都会在 X-Request-Id 响应头中获得一个新的网关执行 ID;请使用该返回的 ID 进行支持与请求链路追踪。如需执行去重,请使用文档中说明的消息恢复协议。 |
回應
{
"schema_version": "1.0.0",
"collection_id": "default",
"collection_generation": 1,
"events": [],
"next_cursor": null,
"has_more": false,
"snapshot_upper_bound": "2026-09-30T10:00:00.000Z",
"pending_summary": {
"pending_event_count": 0
},
"status": "OK"
}