Справочник по API
Используйте один шлюз и ключ API для рабочих процессов, совместимых с OpenAI, Anthropic, Gemini и асинхронных медиа.
- Сервер
https://api.anyint.aiИсточник AnyInt Gateway, обслуживающий этот документ OpenAPI.
80 конечные точки
Интеграция ChatRoom
4 конечные точкиDiscover key-scoped models and enterprise capabilities for independent ChatRoom clients.
Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/tasks/request-costs' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"request_ids": [
"req_example:async"
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"request_ids": [
"req_example:async"
]
}Ответы
{
"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/modelsПример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/models?scope=<scope>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| scope | query | string | Обязательно | — |
| limit | query | integer | Необязательно | —Пример: 1000 |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"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-contextПример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/enterprise-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"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-contextПример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/chatroom/key-context' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"success": true,
"data": {
"userId": "user_example",
"apiKeyId": "key_example",
"featureControls": {
"seedanceAuthorizedAssets": false,
"videoDramaUsage": {
"enabled": false,
"dramaNames": []
}
}
}
}Чат
2 конечные точкиСоздать диалоговые ответы, совместимые с OpenAI.
When routed through a Gemini adapter, usage includes gemini_usage_metadata with the original token counters for precise modality and cache billing. OpenAI output totals include Gemini thinking tokens; detailed native counters are preserved in Chat Completions, its SSE usage frames, and supported Responses conversions. Embedded Portkey Anthropic Chat and directed Responses-to-Anthropic conversions expose inclusive OpenAI input totals and anthropic_usage_metadata with the original ordinary input, cache-read, cache-write and 5m/1h cache-write counters in JSON and SSE for precise billing. Gemini Chat Completions streams emit a terminal choice with finish_reason before data: [DONE]: STOP maps to stop and MAX_TOKENS maps to length. An upstream EOF without a finish reason does not synthesize successful completion. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Invalid request envelopes, missing model/messages and stream values other than boolean or null return HTTP 400 before funding or provider dispatch. A null stream selects non-streaming without rewriting the native request body. Directed Chat conversions to Gemini or Anthropic preserve the smaller positive max_tokens/max_completion_tokens bound. Stop sequences are mapped between the supported Chat protocols; target-model parameter restrictions still apply. Directed Chat SSE uses one created timestamp for all chunks and emits a public usage-only chunk only when stream_options.include_usage is true. Without that option, usage is also removed from mixed content/finish chunks while retaining choices, terminal reasons and error events. Internal usage collection and settlement are independent of this public option. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /v1/chat/completionsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/chat/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}Ответы
{
"id": "chatcmpl_example",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Edge computing processes data near its source, reducing latency and bandwidth use."
},
"finish_reason": "stop"
}
]
}When routed through a Gemini adapter, usage includes gemini_usage_metadata with the original token counters for precise modality and cache billing. OpenAI output totals include Gemini thinking tokens; detailed native counters are preserved in Chat Completions, its SSE usage frames, and supported Responses conversions. Embedded Portkey Anthropic Chat and directed Responses-to-Anthropic conversions expose inclusive OpenAI input totals and anthropic_usage_metadata with the original ordinary input, cache-read, cache-write and 5m/1h cache-write counters in JSON and SSE for precise billing. Gemini Chat Completions streams emit a terminal choice with finish_reason before data: [DONE]: STOP maps to stop and MAX_TOKENS maps to length. An upstream EOF without a finish reason does not synthesize successful completion. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Invalid request envelopes, missing model/messages and stream values other than boolean or null return HTTP 400 before funding or provider dispatch. A null stream selects non-streaming without rewriting the native request body. Directed Chat conversions to Gemini or Anthropic preserve the smaller positive max_tokens/max_completion_tokens bound. Stop sequences are mapped between the supported Chat protocols; target-model parameter restrictions still apply. Directed Chat SSE uses one created timestamp for all chunks and emits a public usage-only chunk only when stream_options.include_usage is true. Without that option, usage is also removed from mixed content/finish chunks while retaining choices, terminal reasons and error events. Internal usage collection and settlement are independent of this public option. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /openai/v1/chat/completionsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/chat/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Explain edge computing in 2 sentences."
}
]
}Ответы
{
"id": "chatcmpl_example",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Edge computing processes data near its source, reducing latency and bandwidth use."
},
"finish_reason": "stop"
}
]
}Ответы
2 конечные точкиСоздать ответы в формате API ответов OpenAI.
When routed through a Gemini adapter, usage includes gemini_usage_metadata with the original token counters for precise modality and cache billing. OpenAI output totals include Gemini thinking tokens; detailed native counters are preserved in Chat Completions, its SSE usage frames, and supported Responses conversions. Embedded Portkey Anthropic Chat and directed Responses-to-Anthropic conversions expose inclusive OpenAI input totals and anthropic_usage_metadata with the original ordinary input, cache-read, cache-write and 5m/1h cache-write counters in JSON and SSE for precise billing. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Native Responses accepts stream:null as non-streaming while retaining null in the native request body. Invalid non-boolean, non-null stream values return HTTP 400 before funding or dispatch. Native Responses preserves custom tool calls, multi-part tool outputs, assistant phase and Unicode text. Missing/null output_text annotations and logprobs become empty arrays before funding and dispatch; provider keep-alive messages are excluded from history. reasoning.effort is forwarded without downgrade: a structured unsupported-value rejection returns HTTP 400 invalid_value with error.param=reasoning.effort and a server-owned message. A provider-generated or unlocatable 400 becomes HTTP 502 upstream_error; transient rejected work is retryable unless the execution outcome is unconfirmed. Directed Responses conversions keep one created_at for response.created and terminal events. Responses-to-Chat validates the actual target conversion before funding, including unsupported history/state inputs. Streaming filters response.metadata, codex.response.metadata, responsesapi.websocket_timing, and SSE-Keep-Alive control items, uses SSE comments for heartbeats, and emits monotonic sequence_number values. Heartbeat names are case-insensitive and accept keepalive, keep-alive and keep_alive variants; they become SSE comments without terminating valid output or changing usage. Repeated SSE event fields use the last field value, including an empty reset. Explicit error/response.failed SSE event headers and error payloads, including nested response.error or response.status=failed, take precedence over heartbeat, diagnostic metadata and keep-alive item markers. Failure event names and failure type markers are recognized case-insensitively without rewriting successful lifecycle types. They emit one sanitized response.failed and suppress subsequent successful completion while preserving the original bytes for settlement. Successful terminal events are delivered only after mandatory stream settlement succeeds: response.completed for success or response.incomplete for a provider token limit. A mandatory settlement failure emits response.failed, retains the already-sent HTTP status, and records a failed final inference outcome. Early EOF, timeout or provider failure ends with response.failed, never a synthesized successful completion or legacy [DONE]. Stream failures are non-retryable because replay can duplicate dispatched work. Optional x-client-message-id/x-resume-message-id headers enable the existing event-offset recovery extension; clients without those headers do not need it.
POST /v1/responsesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/responses' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "Write a short welcome message."
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"input": "Write a short welcome message."
}Ответы
{
"id": "resp_example",
"object": "response",
"status": "completed"
}When routed through a Gemini adapter, usage includes gemini_usage_metadata with the original token counters for precise modality and cache billing. OpenAI output totals include Gemini thinking tokens; detailed native counters are preserved in Chat Completions, its SSE usage frames, and supported Responses conversions. Embedded Portkey Anthropic Chat and directed Responses-to-Anthropic conversions expose inclusive OpenAI input totals and anthropic_usage_metadata with the original ordinary input, cache-read, cache-write and 5m/1h cache-write counters in JSON and SSE for precise billing. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Native Responses accepts stream:null as non-streaming while retaining null in the native request body. Invalid non-boolean, non-null stream values return HTTP 400 before funding or dispatch. Native Responses preserves custom tool calls, multi-part tool outputs, assistant phase and Unicode text. Missing/null output_text annotations and logprobs become empty arrays before funding and dispatch; provider keep-alive messages are excluded from history. reasoning.effort is forwarded without downgrade: a structured unsupported-value rejection returns HTTP 400 invalid_value with error.param=reasoning.effort and a server-owned message. A provider-generated or unlocatable 400 becomes HTTP 502 upstream_error; transient rejected work is retryable unless the execution outcome is unconfirmed. Directed Responses conversions keep one created_at for response.created and terminal events. Responses-to-Chat validates the actual target conversion before funding, including unsupported history/state inputs. Streaming filters response.metadata, codex.response.metadata, responsesapi.websocket_timing, and SSE-Keep-Alive control items, uses SSE comments for heartbeats, and emits monotonic sequence_number values. Heartbeat names are case-insensitive and accept keepalive, keep-alive and keep_alive variants; they become SSE comments without terminating valid output or changing usage. Repeated SSE event fields use the last field value, including an empty reset. Explicit error/response.failed SSE event headers and error payloads, including nested response.error or response.status=failed, take precedence over heartbeat, diagnostic metadata and keep-alive item markers. Failure event names and failure type markers are recognized case-insensitively without rewriting successful lifecycle types. They emit one sanitized response.failed and suppress subsequent successful completion while preserving the original bytes for settlement. Successful terminal events are delivered only after mandatory stream settlement succeeds: response.completed for success or response.incomplete for a provider token limit. A mandatory settlement failure emits response.failed, retains the already-sent HTTP status, and records a failed final inference outcome. Early EOF, timeout or provider failure ends with response.failed, never a synthesized successful completion or legacy [DONE]. Stream failures are non-retryable because replay can duplicate dispatched work. Optional x-client-message-id/x-resume-message-id headers enable the existing event-offset recovery extension; clients without those headers do not need it.
POST /openai/v1/responsesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/responses' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "Write a short welcome message."
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"input": "Write a short welcome message."
}Ответы
{
"id": "resp_example",
"object": "response",
"status": "completed"
}Text Completions
2 конечные точкиСоздать устаревшие текстовые завершения, совместимые с OpenAI.
OpenAI legacy Completions accepts boolean or null stream. Null selects non-streaming and remains null in the native provider request; other non-boolean values return HTTP 400 before funding or provider dispatch.
POST /v1/completionsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Once upon a time"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Once upon a time"
}Ответы
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}OpenAI legacy Completions accepts boolean or null stream. Null selects non-streaming and remains null in the native provider request; other non-boolean values return HTTP 400 before funding or provider dispatch.
POST /openai/v1/completionsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/completions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Once upon a time"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Once upon a time"
}Ответы
{
"id": "cmpl_example",
"object": "text_completion",
"choices": [
{
"index": 0,
"text": " there was a quiet coast."
}
]
}Векторные представления
2 конечные точкиСоздать векторные эмбеддинги из текстового ввода.
Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/embeddings' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}Ответы
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/embeddings' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"input": "A calm ocean at dawn"
}Ответы
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.008,
0.021
]
}
]
}Модерации
2 конечные точкиКлассифицировать потенциально вредоносный текстовый или графический ввод.
Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/moderations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input": "Text to classify"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"input": "Text to classify"
}Ответы
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/moderations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input": "Text to classify"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"input": "Text to classify"
}Ответы
{
"id": "modr_example",
"model": "your-model-id",
"results": [
{
"flagged": false,
"categories": {},
"category_scores": {}
}
]
}Пакеты
8 конечные точкиОтправляйте пакеты JSONL в формате поставщика, когда для развертывания включено объектное хранилище.
Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| after | query | string | Необязательно | — |
| limit | query | integer | Необязательно | —Пример: 20 |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "list",
"data": [
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}
],
"first_id": "batch_example",
"last_id": "batch_example",
"has_more": false
}Native prepaid batches validate the stored file checksum and strict JSONL before funding. Every item needs a server-owned execution policy for its pinned route and price, including file-upload and batch-create transport bounds. All item reservations commit atomically before provider submission; insufficient aggregate funds return HTTP 402 without submitting a partial batch. Incompatible provider configurations must be split into separate batches. Each submission permits one file upload and one batch create; an ambiguous submission returns batch_submission_recovery_required and retains funding without automatic resubmission. Failed, cancelled or missing item results do not prove zero provider cost and retain funding for reconciliation.
POST /v1/batchesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Тело запроса
Обязательно{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}Ответы
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| after | query | string | Необязательно | — |
| limit | query | integer | Необязательно | —Пример: 20 |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "list",
"data": [
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}
],
"first_id": "batch_example",
"last_id": "batch_example",
"has_more": false
}Native prepaid batches validate the stored file checksum and strict JSONL before funding. Every item needs a server-owned execution policy for its pinned route and price, including file-upload and batch-create transport bounds. All item reservations commit atomically before provider submission; insufficient aggregate funds return HTTP 402 without submitting a partial batch. Incompatible provider configurations must be split into separate batches. Each submission permits one file upload and one batch create; an ambiguous submission returns batch_submission_recovery_required and retains funding without automatic resubmission. Failed, cancelled or missing item results do not prove zero provider cost and retain funding for reconciliation.
POST /openai/v1/batchesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/batches' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Тело запроса
Обязательно{
"input_file_id": "file_example",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}Ответы
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| batch_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| batch_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| batch_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/batches/<batch_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| batch_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "batch_example",
"object": "batch",
"endpoint": "/v1/chat/completions",
"input_file_id": "file_example",
"completion_window": "24h",
"status": "in_progress",
"created_at": 1700000000,
"request_counts": {
"total": 100,
"completed": 0,
"failed": 0
}
}Файлы
5 конечные точкиЗагружать, перечислять, проверять и скачивать файлы.
Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "list",
"data": [
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}
]
}Перед сохранением содержимого применяет политики API key по IP и числу запросов в минуту. Загрузки не зависят от модели и не расходуют квоты инференса. Файлы истекают через 30 дней после загрузки, если expires_after не задаёт более короткий срок (от 1 часа до 30 дней); истёкшие файлы больше не отображаются в списке, недоступны для скачивания и удаляются. Каждый тенант может хранить не более 10 000 активных файлов общим объёмом 10 GiB.
POST /openai/v1/filesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/files' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'file=@path/to/document.jsonl' \
--form 'purpose=batch'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"file": "document.jsonl",
"purpose": "batch"
}Ответы
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| file_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "file_example",
"object": "file",
"bytes": 128,
"created_at": 1700000000,
"filename": "document.jsonl",
"purpose": "batch",
"status": "processed"
}Пример запроса
curl \
--request DELETE \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| file_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "file_example",
"object": "file",
"deleted": true
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/files/<file_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| file_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
<binary>Аудио
3 конечные точкиТранскрибировать аудио, переводить аудио на английский язык или синтезировать речь.
Native prepaid organizations reserve the greater of customer and provider maximum costs before audio provider dispatch. A missing or mismatched server-owned execution bound returns non-retryable HTTP 503 prepaid_execution_bound_unavailable. Multipart bounds include file sizes and content hashes. Insufficient funds return HTTP 402. Successful responses require the configured billable usage; missing required usage returns HTTP 502 and retains funding. Provider errors or unknown outcomes retain funding for audited recovery. Personal and postpaid audio behavior is preserved.
POST /openai/v1/audio/transcriptionsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/transcriptions' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'file=@path/to/audio.wav' \
--form 'model=your-model-id'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"file": "audio.wav",
"model": "your-model-id"
}Ответы
{
"text": "Example transcript."
}Native prepaid organizations reserve the greater of customer and provider maximum costs before audio provider dispatch. A missing or mismatched server-owned execution bound returns non-retryable HTTP 503 prepaid_execution_bound_unavailable. Multipart bounds include file sizes and content hashes. Insufficient funds return HTTP 402. Successful responses require the configured billable usage; missing required usage returns HTTP 502 and retains funding. Provider errors or unknown outcomes retain funding for audited recovery. Personal and postpaid audio behavior is preserved.
POST /openai/v1/audio/translationsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/translations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--form 'file=@path/to/audio.wav' \
--form 'model=your-model-id'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"file": "audio.wav",
"model": "your-model-id"
}Ответы
{
"text": "Example transcript."
}Native prepaid organizations reserve the greater of customer and provider maximum costs before audio provider dispatch. A missing or mismatched server-owned execution bound returns non-retryable HTTP 503 prepaid_execution_bound_unavailable. Multipart bounds include file sizes and content hashes. Insufficient funds return HTTP 402. Successful responses require the configured billable usage; missing required usage returns HTTP 502 and retains funding. Provider errors or unknown outcomes retain funding for audited recovery. Personal and postpaid audio behavior is preserved.
POST /openai/v1/audio/speechПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/speech' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: audio/mpeg' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"voice": "your-voice-id",
"input": "Welcome to AnyInt Gateway."
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"voice": "your-voice-id",
"input": "Welcome to AnyInt Gateway."
}Ответы
<binary>Изображения
4 конечные точкиGenerate and edit images with OpenAI-compatible requests.
Accepts multipart uploaded images or nonstreaming JSON URL inputs. JSON requires model, prompt and 1-16 images with image_url; mask may contain one image_url. URL inputs use the selected upstream's native JSON Images API, so that channel must support URL edits. Model permissions, enterprise channel selection, funding and settlement apply to both inputs. URLs must use public HTTPS without embedded credentials; the gateway does not download them. Other native JSON parameters are preserved. gpt-image-2 defaults quality to medium. Malformed URL inputs, missing images, unsupported streaming, invalid image count and invalid quality return HTTP 400 before funding or provider dispatch.
POST /v1/images/editsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/images/edits' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}Ответы
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Accepts multipart uploaded images or nonstreaming JSON URL inputs. JSON requires model, prompt and 1-16 images with image_url; mask may contain one image_url. URL inputs use the selected upstream's native JSON Images API, so that channel must support URL edits. Model permissions, enterprise channel selection, funding and settlement apply to both inputs. URLs must use public HTTPS without embedded credentials; the gateway does not download them. Other native JSON parameters are preserved. gpt-image-2 defaults quality to medium. Malformed URL inputs, missing images, unsupported streaming, invalid image count and invalid quality return HTTP 400 before funding or provider dispatch.
POST /openai/v1/images/editsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/images/edits' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Combine these reference images on a soft blue background.",
"images": [
{
"image_url": "https://cdn.example.com/reference-1.png"
},
{
"image_url": "https://cdn.example.com/reference-2.png"
}
]
}Ответы
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Accepts multipart uploaded images or nonstreaming JSON URL inputs. JSON requires model, prompt and 1-16 images with image_url; mask may contain one image_url. URL inputs use the selected upstream's native JSON Images API, so that channel must support URL edits. Model permissions, enterprise channel selection, funding and settlement apply to both inputs. URLs must use public HTTPS without embedded credentials; the gateway does not download them. Other native JSON parameters are preserved. gpt-image-2 defaults quality to medium. Malformed URL inputs, missing images, unsupported streaming, invalid image count and invalid quality return HTTP 400 before funding or provider dispatch.
POST /v1/images/generationsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/images/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}Ответы
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Accepts multipart uploaded images or nonstreaming JSON URL inputs. JSON requires model, prompt and 1-16 images with image_url; mask may contain one image_url. URL inputs use the selected upstream's native JSON Images API, so that channel must support URL edits. Model permissions, enterprise channel selection, funding and settlement apply to both inputs. URLs must use public HTTPS without embedded credentials; the gateway does not download them. Other native JSON parameters are preserved. gpt-image-2 defaults quality to medium. Malformed URL inputs, missing images, unsupported streaming, invalid image count and invalid quality return HTTP 400 before funding or provider dispatch.
POST /openai/v1/images/generationsПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/images/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud",
"n": 1
}Ответы
{
"created": 1700000000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB"
}
]
}Модели
5 конечные точкиПоиск моделей, доступных через каждый протокол.
Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "list",
"data": [
{
"id": "your-model-id",
"object": "model",
"created": 1767225600,
"owned_by": "configured-provider"
}
]
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/anthropic/v1/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"data": [
{
"id": "your-model-id",
"type": "model",
"display_name": "Configured model",
"created_at": "2026-01-01T00:00:00.000Z"
}
],
"has_more": false,
"first_id": "your-model-id",
"last_id": "your-model-id"
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/gemini/v1beta/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"models": [
{
"name": "models/your-model-id",
"displayName": "Configured model",
"supportedGenerationMethods": [
"generateContent"
],
"inputTokenLimit": 8192,
"outputTokenLimit": 8192
}
]
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1beta/models' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Асинхронные медиа
23 конечные точкиСоздавать и проверять асинхронные задачи для изображений, видео и музыки.
Seedance принимает активные ссылки asset:// на изображения и видео, включая смешанное содержимое reference_image и reference_video. Каждая ссылка должна принадлежать текущей библиотеке ресурсов предприятия. Для ссылок на несовместимую библиотеку до маршрутизации, создания задачи или отправки в вышестоящий сервис возвращается HTTP 400 authorized_asset_provider_mismatch, retryable=false и user_action=simplify_input. Перед повторной попыткой зарегистрируйте указанные изображения и видео в текущей библиотеке и обновите ссылки на них.
POST /v1/videosПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/videos' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/videos/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
<binary>Seedance принимает активные ссылки asset:// на изображения и видео, включая смешанное содержимое reference_image и reference_video. Каждая ссылка должна принадлежать текущей библиотеке ресурсов предприятия. Для ссылок на несовместимую библиотеку до маршрутизации, создания задачи или отправки в вышестоящий сервис возвращается HTTP 400 authorized_asset_provider_mismatch, retryable=false и user_action=simplify_input. Перед повторной попыткой зарегистрируйте указанные изображения и видео в текущей библиотеке и обновите ссылки на них.
POST /openai/v1/videosПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/videos' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/videos/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "video",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/videos/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
<binary>Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/audio/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/audio/generations/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
<binary>Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/openai/v1/audio/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-name",
"prompt": "A calm landscape",
"duration_seconds": 5
}Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/audio/generations/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"id": "task_example",
"taskId": "task_example",
"object": "audio",
"status": "queued",
"created_at": 0
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/openai/v1/audio/generations/<task_id>/content' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/octet-stream'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
<binary>Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/image-generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud"
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "A minimal paper sculpture of a cloud"
}Ответы
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/video-generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}Ответы
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "video_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/videos/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Slow aerial movement over a quiet coast",
"duration_seconds": 6,
"fps": 24
}Ответы
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "video_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/music-generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}Ответы
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "music_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/music/generations' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"prompt": "Warm ambient music with soft piano",
"duration_seconds": 30
}Ответы
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "music_generation",
"status": "submitted",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
"anyint": {
"request_id": "req_example",
"route_decision_id": "route_example"
},
"duplicate": true
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "list",
"data": [
{
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "async_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/tasks/<task_id>' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "generation_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "generation_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>/cancel' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"object": "generation_task",
"task": {
"id": "task_example",
"requestId": "req_example",
"tenantId": "tenant_example",
"protocol": "openai",
"taskType": "image_generation",
"status": "queued",
"input": {
"prompt": "Example prompt"
},
"artifacts": [],
"artifactCount": 0,
"artifact_count": 0,
"billingSessions": [],
"billing_sessions": [],
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/async-tasks/<task_id>/artifacts/<artifact_id>?tenant_id=<tenant_id>&expires_at=<expires_at>&signature=<signature>' \
--header 'Accept: application/octet-stream'Аутентификация
Аутентификация не требуется
Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| task_id | path | string | Обязательно | — |
| artifact_id | path | string | Обязательно | — |
| tenant_id | query | string | Обязательно | — |
| expires_at | query | integer | Обязательно | — |
| signature | query | string | Обязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
<binary>Сообщения Anthropic
4 конечные точкиИспользуйте сообщения в формате Anthropic, подсчет токенов и обнаружение моделей.
When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /anthropic/v1/messagesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/anthropic/v1/messages' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}Ответы
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/anthropic/v1/messages/count_tokens' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}Ответы
{
"input_tokens": 12
}When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /v1/messagesПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/messages' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain edge computing briefly."
}
]
}Ответы
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Edge computing runs workloads near the data source."
}
]
}Пример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1/messages/count_tokens' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"model": "your-model-id",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}Ответы
{
"input_tokens": 12
}Контент Gemini
8 конечные точкиИспользуйте генерацию и потоковую передачу контента в формате Gemini.
Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /gemini/v1beta/models/{model}:generateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>:generateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /gemini/v1beta/models/{model}:streamGenerateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>:streamGenerateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| alt | query | string | Необязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /gemini/v1beta/models/{model}/generateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>/generateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /gemini/v1beta/models/{model}/streamGenerateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/gemini/v1beta/models/<model>/streamGenerateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| alt | query | string | Необязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /v1beta/models/{model}:generateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1beta/models/<model>:generateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /v1beta/models/{model}:streamGenerateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1beta/models/<model>:streamGenerateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| alt | query | string | Необязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /v1beta/models/{model}/generateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1beta/models/<model>/generateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Edge computing reduces latency."
}
]
}
}
]
}Gemini 4 Argon on the Gemini Developer API supports Standard inference only. Omit serviceTier/service_tier or set it to standard; other values return HTTP 400 before upstream dispatch. When billing is enabled, built-in web search declared in tools or Responses input.additional_tools requires a compiled price rule covering web_search_queries and the request dimensions. Namespace tool declarations are checked without treating client functions as built-in search. Before initial funding reservation, routing checks eligible, authorized candidates in order and skips candidates without required search pricing. Required channel/provider and continuation affinity restrictions remain enforced. If no permitted candidate has coverage, admission returns HTTP 503 search_tool_pricing_not_configured without provider dispatch or funding reservation. Each actual fallback and supply-tier candidate is checked again before dispatch; missing pricing never consumes a provider attempt. For enterprise postpaid requests, actual provider usage above the initial estimate is checked against remaining authorized budgets before settlement. Budget denial retains the recorded usage and price for reconciliation. Client function tools are unaffected. Native requests preserve provider parameters, subject to the selected model's official support. Cross-protocol requests map supported content and controls through a request IR. Unmapped extensions and approximate controls are recorded in conversion diagnostics without rejecting otherwise usable requests. Malformed source content still returns HTTP 400. Cross-protocol tool declarations that cannot be represented return HTTP 400 before funding rather than being silently discarded; eligible native routes may preserve native-only tools. Anthropic stop_sequences are mapped to Chat stop; an upstream-unreported matched sequence is not fabricated. Requests using Responses previous_response_id/conversation, Anthropic thread, or Gemini cachedContent require their server-side state. These references are never discarded even when input contains repeated history. Routing excludes conversions that cannot preserve state and prefers an eligible native route; state ownership still depends on the original provider/account and existing continuation affinity checks. If all candidates are excluded for this reason, HTTP 422 conversation_state_unavailable is returned before provider dispatch. The gateway does not currently materialize referenced history. Native protocol availability alone does not prove that a private state ID exists in the selected account. Fallback does not automatically downgrade json_schema to json_object. Configured deployments accept model=auto or auto-cn for Chat Completions, Responses, Anthropic Messages, and Gemini generateContent. Before feature scoring, auto routing filters native json_schema/json_object support, explicit thinking-off support, full input length plus the requested output reservation, and required input modalities. Text context length includes full system/history/tool definitions and results and JSON structure, using one UTF-16 character per estimated text token until tokenizer integration. Explicit media transport payloads are replaced with type placeholders for this estimate; Base64 length is not a media token count. Actual media token usage and limits remain provider-specific and are validated upstream. JSON and thinking-off support comes from published llm_capabilities (jsonSchema, jsonObject, reasoning, reasoningDisable); missing hard-capability facts do not count as support. Models without reasoning satisfy thinking-off. Reasoning strength, summary verbosity, hidden thoughts and optional output metadata do not filter candidates. When Redis is configured, Auto first checks a tenant-, API-key-, routing-mode- and protocol-scoped explicit client session binding, then a history fingerprint. Session extraction prefers X-Claude-Code-Session-Id, X-OpenCode-Session-Id, X-DeepSeek-Harness-Session-Id, X-QwenWork-Session-Id and thread-id, then Responses client_metadata session_id/thread_id and the same fields in JSON x-codex-turn-metadata. Generic X-Session-Id, session_id, session-id, X-Cursor-Session and X-OpenClaw-Session-Id follow, then body session_id, sessionId, metadata.session_id and metadata.sessionId. Anthropic also accepts session_id inside JSON metadata.user_id. X-Task-ID, X-OpenCode-Session and X-Session-Affinity are fallback identities only. A KimiCLI/ User-Agent additionally enables the known Chat Completions prompt_cache_key or Anthropic plain metadata.user_id session convention. Missing or malformed identifiers do not reject requests. User/account, request, prompt, turn and parent identifiers are not globally treated as session IDs. Session lookup failures still try history; both bindings update only on successful completion. History v2 excludes non-message roles/control items and incomplete tool-call identifiers; no User boundary means all available history is sampled. A valid hit skips Jev scoring and its routing fee after rechecking current candidate eligibility; if that bound model fails, Auto bypasses the binding and scores once to fill the remaining distinct model attempts. Misses and cache failures use normal scoring. Bindings expire after 24 hours and are written only after successful JSON or complete SSE responses; cancelled, incomplete, ambiguous or oversized streams do not create bindings. The smart router scores the remaining current gateway catalog models permitted by the API key and protocol, then the selected concrete model follows existing entitlement, channel routing and billing rules. For auto/auto-cn, Vertex Gemini text requests from Chat Completions, Responses and Anthropic use Vertex's OpenAI-compatible Chat endpoint with the same account, model and published Gemini tariff. Chat message/tool payloads are preserved; Responses and Anthropic are converted only to Chat. Auto requests containing video retain the native Gemini generateContent/streamGenerateContent conversion because Vertex Chat rejects video_url; media bytes, mixed audio, account and Gemini pricing are preserved. Explicit model requests and native Gemini/media paths retain their existing routing. Prices and context limits come from the current published catalog; missing context limits may use the versioned capability snapshot and are logged. Optional capability overrides do not define the candidate list. Task feature failures are recorded as degraded and use the neutral demand value. Missing configuration or scorer credentials, an invalid catalog, or no eligible model returns HTTP 503 (auto_routing_not_configured, auto_routing_configuration_invalid, auto_routing_scorer_unavailable, auto_routing_no_candidates). Selection failure returns auto_routing_failed. For Responses history, only message items (including omitted type) require role; non-message items stay in the full upstream request and are excluded from scoring. Jev receives only user/assistant text plus a system prefix of at most 500 weighted characters; tool definitions, calls/results and other roles are excluded. Image, audio, video and file content blocks are inspected across the full request before scoring. The published model input modalities must cover every attached input kind, and every selected or fallback channel must explicitly declare these kinds in metadata.input_modalities (inputModalities is also accepted); incompatible channels return capability_mismatch before dispatch. Unknown MIME types and opaque file references require file support. Media bytes, URLs and file IDs are excluded from Jev material and replaced with attachment-type placeholders; the original wire request is preserved. No multimodal demand feature or capability score is introduced. Non-text output, image-generation tools and server-stored Responses continuations still require an explicit model and return HTTP 400 auto_routing_request_unsupported. Auto tries the next ranked model after every unsuccessful model attempt, including any non-2xx response, generic HTTP 400 validation errors, provider refusals, 5xx, timeouts, transport errors and unclassified local execution failures. Failure classification and uncertain provider cost do not block fallback. Each attempt retains its own settlement evidence; retrying does not convert an uncertain provider outcome into confirmed zero cost. At most three distinct ranked models are attempted with one feature evaluation. Each attempt repeats existing authorization, quota, rate-limit, routing and funding checks under an independent execution ID. The public X-Request-Id remains stable; execution records and billing metadata retain their correlation. Client cancellation or successful response delivery stops cross-model fallback. Streams already delivered to the client are not restarted. Each candidate still must pass authorization and funding checks; a denied check never authorizes upstream dispatch. When all candidates fail, the final attempt error is returned. Explicit model requests do not use this fallback. After a successful final model execution that required Jev scoring, Auto adds one platform routing fee on the public parent request ID: min(20 * L / 1000000 + 0.01505, 0.2) credits, where L is the UTF-16 string length of the compressed Jev state (JSON serialization for an object), measured once across scorer calls. One USD equals 100 credits; fees round half away from zero to micro-USD (0.0001 credits). Failed or incomplete streams and failed final executions do not incur this fee. The billing model is auto, including auto-cn requests. Request-cost lookups for a public Auto request ID include its routing fee and all settled child execution charges.
POST /v1beta/models/{model}/streamGenerateContentПример запроса
curl \
--request POST \
--url 'https://api.anyint.ai/v1beta/models/<model>/streamGenerateContent' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: text/event-stream' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| model | path | string | Обязательно | — |
| alt | query | string | Необязательно | — |
| X-Client-Message-Id | header | string | Необязательно | Opt in to durable tenant-scoped execution deduplication. Reuse only with the identical request body and API key. Completed or possibly dispatched requests never expire into another execution, including after Redis loss. Upstream errors or settlement rollback after dispatch require a new message ID for another execution; failures before dispatch may retry the same ID. |
| X-Resume-Message-Id | header | string | Необязательно | Replay a previously generated SSE stream under the original API key and identical request body. This request does not dispatch or bill the provider. Cache retention is 10 minutes and total output is limited to 4 MiB; interrupted generations require a new message ID for continuation. |
| X-Resume-From-Offset | header | integer | Необязательно | Number of complete SSE events already consumed, matching the last SSE id. Starts at 0; UTF-8 bytes, tokens and characters are not valid units. Takes precedence over Last-Event-ID. |
| Last-Event-ID | header | integer | Необязательно | Alternative complete SSE event offset when X-Resume-From-Offset is absent. |
| X-Request-Id | header | string | Необязательно | 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. |
Тело запроса
Обязательно{
"contents": [
{
"parts": [
{
"text": "Explain edge computing briefly."
}
]
}
]
}Ответы
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Edge computing reduces latency."}]}}]}
Другие конечные объекты (Knowledge Crystallization)
1 Конечная точкаExport crystallized AI conversation events for local Markdown notes sync.
Пример запроса
curl \
--request GET \
--url 'https://api.anyint.ai/v1/knowledge/export' \
--header 'Authorization: Bearer <ANYINT_API_KEY>' \
--header 'Accept: application/json'Аутентификация
http · bearerПередайте API-ключ разработчика AnyInt в качестве токена Bearer в заголовке Authorization.Параметры
| Имя | Расположение | Тип | Обязательно | Описание |
|---|---|---|---|---|
| cursor | query | string | Необязательно | — |
| limit | query | integer | Необязательно | — |
| collection_id | query | string | Необязательно | — |
| X-Request-Id | header | string | Необязательно | 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. |
Ответы
{
"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"
}