Tham chiếu API
Sử dụng một cổng và khóa API trên các quy trình làm việc phương tiện không đồng bộ, OpenAI-compatible, Anthropic và Gemini.
- Server
https://api.anyint.aiNguồn AnyInt Gateway phục vụ tài liệu OpenAPI này.
75 điểm cuối
Tích hợp ChatRoom
4 điểm cuốiDiscover key-scoped models and enterprise capabilities for independent ChatRoom clients.
Ví dụ yêu cầu
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"
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"request_ids": [
"req_example:async"
]
}Các phản hồi
{
"request_costs": [
{
"request_id": "req_example:async",
"credits": 125
}
]
}Native ChatRoom metadata authenticated with a Developer API key. Preserves existing tenant/key visibility and imported stable asset ownership references.
GET /v1/chatroom/modelsVí dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/models?scope=<scope>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| scope | query | string | Bắt buộc | — |
| limit | query | integer | Tùy chọn | —Ví dụ: 1000 |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"success": true,
"data": {
"models": [],
"total": 0
}
}Native ChatRoom metadata authenticated with a Developer API key. Preserves existing tenant/key visibility and imported stable asset ownership references.
GET /v1/chatroom/enterprise-contextVí dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/enterprise-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"success": true,
"data": {
"featureControls": {
"seedanceAuthorizedAssets": false,
"videoDramaUsage": {
"enabled": false,
"dramaNames": []
}
}
}
}Native ChatRoom metadata authenticated with a Developer API key. Preserves existing tenant/key visibility and imported stable asset ownership references.
GET /v1/chatroom/key-contextVí dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/key-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"success": true,
"data": {
"userId": "user_example",
"apiKeyId": "key_example",
"featureControls": {
"seedanceAuthorizedAssets": false,
"videoDramaUsage": {
"enabled": false,
"dramaNames": []
}
}
}
}Trò chuyện
2 điểm cuốiTạo các phản hồi hội thoại tương thích với OpenAI.
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /v1/chat/completionsVí dụ yêu cầu
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."
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}Các phản hồi
{
"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"
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /openai/v1/chat/completionsVí dụ yêu cầu
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."
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}Các phản hồi
{
"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"
}
]
}Phản hồi
2 điểm cuốiTạo phản hồi với định dạng API Phản hồi của OpenAI.
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /v1/responsesVí dụ yêu cầu
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."
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"input": "Write a short welcome message."
}Các phản hồi
{
"id": "resp_example",
"object": "response",
"status": "completed"
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /openai/v1/responsesVí dụ yêu cầu
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."
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"input": "Write a short welcome message."
}Các phản hồi
{
"id": "resp_example",
"object": "response",
"status": "completed"
}Hoàn thành văn bản
2 điểm cuốiTạo các hoàn thành văn bản cũ tương thích với OpenAI.
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /v1/completionsVí dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "Once upon a time"
}Các phản hồi
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /openai/v1/completionsVí dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "Once upon a time"
}Các phản hồi
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}Embeddings
2 điểm cuốiTạo vector embeddings từ đầu vào văn bản.
Ví dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}Các phản hồi
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}Ví dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}Các phản hồi
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}Kiểm duyệt
2 điểm cuốiPhân loại văn bản hoặc hình ảnh có khả năng gây hại.
Ví dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"input": "Text to classify"
}Các phản hồi
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}Ví dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"input": "Text to classify"
}Các phản hồi
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}Lô
8 điểm cuốiGửi các lô JSONL gốc của nhà cung cấp khi bộ nhớ đối tượng được bật cho bản triển khai.
Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| after | query | string | Tùy chọn | — |
| limit | query | integer | Tùy chọn | —Ví dụ: 20 |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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/batchesVí dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Nội dung yêu cầu
Bắt buộc{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}Các phản hồi
{
"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
}
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| after | query | string | Tùy chọn | — |
| limit | query | integer | Tùy chọn | —Ví dụ: 20 |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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/batchesVí dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Nội dung yêu cầu
Bắt buộc{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}Các phản hồi
{
"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
}
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| batch_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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
}
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| batch_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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
}
}Ví dụ yêu cầu
curl \
--request POST \
--url 'https://api.anyint.ai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| batch_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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
}
}Ví dụ yêu cầu
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| batch_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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
}
}Tệp
5 điểm cuốiTải lên, liệt kê, kiểm tra và tải xuống các tệp.
Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"object": "list",
"data": [
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}
]
}Áp dụng chính sách IP và số yêu cầu mỗi phút của API key trước khi lưu nội dung. Việc tải lên không phụ thuộc mô hình và không tiêu tốn hạn mức suy luận. Tệp hết hạn sau 30 ngày kể từ khi tải lên, trừ khi expires_after đặt thời hạn ngắn hơn (từ 1 giờ đến 30 ngày); tệp hết hạn không còn được liệt kê hay tải xuống và sẽ bị xóa. Mỗi tenant có thể giữ tối đa 10.000 tệp đang hoạt động với tổng dung lượng 10 GiB.
POST /openai/v1/filesVí dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"file": "document.jsonl",
"purpose": "batch"
}Các phản hồi
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| file_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}Ví dụ yêu cầu
curl \
--request DELETE \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| file_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"id": "file_example",
"object": "file",
"deleted": true
}Ví dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| file_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
<binary>Âm thanh
3 điểm cuốiPhiên âm âm thanh, dịch âm thanh sang tiếng Anh hoặc tổng hợp giọng nói.
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/transcriptionsVí dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"file": "audio.wav",
"model": "your-model-id"
}Các phản hồi
{
"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/translationsVí dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"file": "audio.wav",
"model": "your-model-id"
}Các phản hồi
{
"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/speechVí dụ yêu cầu
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."
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"voice": "your-voice-id",
"input": "Welcome to AnyInt Gateway."
}Các phản hồi
<binary>Hình ảnh
4 điểm cuốiGenerate and edit images with OpenAI-compatible requests.
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /v1/images/editsVí dụ yêu cầu
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"
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"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"
}
]
}Các phản hồi
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /openai/v1/images/editsVí dụ yêu cầu
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"
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"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"
}
]
}Các phản hồi
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /v1/images/generationsVí dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}Các phản hồi
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /openai/v1/images/generationsVí dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}Các phản hồi
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Mô hình
4 điểm cuốiKhám phá các mô hình có sẵn qua từng giao thức.
Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/anthropic/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/gemini/v1beta/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"models": [
{
"name": "models/your-model-id",
"displayName": "Configured model",
"supportedGenerationMethods": [
"generateContent"
],
"inputTokenLimit": 8192,
"outputTokenLimit": 8192
}
]
}Phương tiện không đồng bộ
23 điểm cuốiTạo và kiểm tra các tác vụ không đồng bộ về hình ảnh, video và nhạc.
Seedance chấp nhận các tham chiếu asset:// hình ảnh và video đang hoạt động, bao gồm nội dung hỗn hợp reference_image và reference_video. Mỗi tham chiếu phải thuộc thư viện tài sản hiện tại của doanh nghiệp. Tham chiếu đến thư viện không tương thích sẽ trả về HTTP 400 authorized_asset_provider_mismatch, retryable=false và user_action=simplify_input trước khi định tuyến, tạo tác vụ hoặc gửi lên upstream. Hãy đăng ký các hình ảnh và video được tham chiếu trong thư viện hiện tại và cập nhật tham chiếu của chúng trước khi thử lại.
POST /v1/videosVí dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
<binary>Seedance chấp nhận các tham chiếu asset:// hình ảnh và video đang hoạt động, bao gồm nội dung hỗn hợp reference_image và reference_video. Mỗi tham chiếu phải thuộc thư viện tài sản hiện tại của doanh nghiệp. Tham chiếu đến thư viện không tương thích sẽ trả về HTTP 400 authorized_asset_provider_mismatch, retryable=false và user_action=simplify_input trước khi định tuyến, tạo tác vụ hoặc gửi lên upstream. Hãy đăng ký các hình ảnh và video được tham chiếu trong thư viện hiện tại và cập nhật tham chiếu của chúng trước khi thử lại.
POST /openai/v1/videosVí dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
<binary>Ví dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
<binary>Ví dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Ví dụ yêu cầu
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'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
<binary>Ví dụ yêu cầu
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"
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud"
}Các phản hồi
{
"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
}Ví dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}Các phản hồi
{
"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
}Ví dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}Các phản hồi
{
"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
}Ví dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}Các phản hồi
{
"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
}Ví dụ yêu cầu
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
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}Các phản hồi
{
"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
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}
]
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}
}Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}
}Ví dụ yêu cầu
curl \
--request POST \
--url 'https://api.anyint.ai/v1/tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}
}Ví dụ yêu cầu
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}
}Ví dụ yêu cầu
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'Xác thực
Không yêu cầu xác thực
Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| task_id | path | string | Bắt buộc | — |
| artifact_id | path | string | Bắt buộc | — |
| tenant_id | query | string | Bắt buộc | — |
| expires_at | query | integer | Bắt buộc | — |
| signature | query | string | Bắt buộc | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
<binary>Tin nhắn Anthropic
4 điểm cuốiSử dụng tin nhắn gốc Anthropic, đếm token và khám phá mô hình.
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /anthropic/v1/messagesVí dụ yêu cầu
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."
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}Các phản hồi
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}Ví dụ yêu cầu
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"
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}Các phản hồi
{
"input_tokens": 12
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /v1/messagesVí dụ yêu cầu
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."
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}Các phản hồi
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}Ví dụ yêu cầu
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"
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}Các phản hồi
{
"input_tokens": 12
}Nội dung Gemini
4 điểm cuốiSử dụng tính năng tạo và truyền nội dung gốc Gemini.
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /gemini/v1beta/models/{model}:generateContentVí dụ yêu cầu
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."
}
]
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| model | path | string | Bắt buộc | — |
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Các phản hồi
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /gemini/v1beta/models/{model}:streamGenerateContentVí dụ yêu cầu
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."
}
]
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| model | path | string | Bắt buộc | — |
| alt | query | string | Tùy chọn | — |
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Các phản hồi
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /gemini/v1beta/models/{model}/generateContentVí dụ yêu cầu
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."
}
]
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| model | path | string | Bắt buộc | — |
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Các phản hồi
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Gọi điểm cuối này để thực hiện thao tác được mô tả.
POST /gemini/v1beta/models/{model}/streamGenerateContentVí dụ yêu cầu
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."
}
]
}
]
}'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| model | path | string | Bắt buộc | — |
| alt | query | string | Tùy chọn | — |
| X-Client-Message-Id | header | string | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | 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 | Tùy chọn | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Nội dung yêu cầu
Bắt buộc{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Các phản hồi
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
Các điểm cuối khác (Knowledge Crystallization)
1 điểm cuốiExport crystallized AI conversation events for local Markdown notes sync.
Ví dụ yêu cầu
curl \
--request GET \
--url 'https://api.anyint.ai/v1/knowledge/export' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Xác thực
http · bearerTruyền khóa API nhà phát triển AnyInt dưới dạng mã thông báo Bearer trong tiêu đề Authorization.Tham số
| Tên | Vị trí | Loại | Bắt buộc | Mô tả |
|---|---|---|---|---|
| cursor | query | string | Tùy chọn | — |
| limit | query | integer | Tùy chọn | — |
| collection_id | query | string | Tùy chọn | — |
| X-Request-Id | header | string | Tùy chọn | Optional client correlation ID. Valid values (8–128 letters, digits, dots, underscores, colons or dashes) are retained only as a diagnostic hash. This header does not deduplicate requests. Each HTTP request receives a fresh gateway execution ID in the X-Request-Id response header; use that returned ID for support and request traces. Use the documented message recovery protocol for execution deduplication. |
Các phản hồi
{
"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"
}