Las descripciones de las operaciones y los campos son las del contrato, en inglés.
/v1/chat/completionsCreate a chat completion
- Credencial
- API key
- Permiso
inference.invoke- SSE
- Puede transmitir en streaming (server-sent events)
- Cuerpo de la solicitud
- Cuerpo de hasta 8 MiB
Creates a chat completion through a chat-completions deployment, in the OpenAI Chat Completions wire.
Leer más
The request body is forwarded to the model server as the client sent it; see ChatRequest for the three members the platform rewrites. stream is optional and defaults to false, and the answer depends on it. With "stream": true the answer is a text/event-stream response. Each data: line carries one chat.completion.chunk object (ChatCompletionChunk) as the model server produced it, relayed as it arrives, with the catalog model id in model; the platform always asks the model server for usage, so one that honours it ends with a chunk that has an empty choices array and a usage object, whatever stream_options the client sent. The stream ends with data: [DONE]. A failure before the first chunk is never a 200: it is a JSON error response with the status of the failure. With a stream, a 429 of the model server is a 429 provider-rate-limited, a timeout a 504 provider-timeout and any other failure a 502 provider-error; without a stream, a 429, a 5xx or an unusable answer of the model server is a 503 provider-unavailable (the deployment that failed is the only one left to try) and a 4xx of it a 502 provider-error. The quota gate of the router is a 429 in both. A failure after the first chunk cannot change the status: when the model server fails or the connection to it breaks, the stream just ends without data: [DONE], and a client must treat a stream that ends without it as failed; when the platform itself aborts the stream, one data: line holds an error object (OpenAIErrorEnvelope) followed by data: [DONE]. With stream omitted or false the answer is one application/json chat.completion object (ChatCompletion) that the platform builds from the same chunks: choices[].message holds the role, the content (null when only tool calls came back), the tool_calls and, when the model server sent reasoning, reasoning and reasoning_content; usage holds prompt_tokens, completion_tokens and total_tokens (zeros when the model server reported none, which the request log's measurement then tells apart from a call that used nothing). A failure is always a JSON error response, never a partial object.
curl -N -X POST "https://api.latam.ccsio.ai/v1/chat/completions" \
-H "Authorization: Bearer $CCSIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.8-flash-next",
"messages": [
{
"role": "user",
"content": "Say hello in one sentence."
}
]
}'Parámetros
| Nombre | En | Descripción |
|---|---|---|
X-Request-IDopcional | header | string Optional request ULID. Lowercase input is accepted; the response X-Request-ID header uses the canonical uppercase form. When the header is absent, or is not a ULID, the platform mints the id: no request is refused for it. |
X-Trace-IDopcional | header | string Optional trace correlation identifier. Any non-empty value is accepted and travels as a correlation label only, never as an authorization input; when it is absent the platform mints one. |
X-Residencyopcional | header | string Ignored. The residency a request is placed in is the organization's, never a header's: a value sent here changes nothing. Kept so that clients that still send it validate. |
X-Data-Regionopcional | header | string Ignored. The data region a request is placed in is the organization's, never a header's: a value sent here changes nothing. Kept so that clients that still send it validate. |
X-Session-Idopcional | header | string Optional client-provided session label, accepted on every /v1 operation. It groups the caller's requests in the request log (the session_id of the usage facts and of the request-log reads); it is a label only, never an identity, and is never used for authorization or tenancy. Leer másGrammar ^[A-Za-z0-9._:-]{1,128}$, given at most once: anything else (empty, longer than 128 characters, other characters, repeated) is refused 400 session-id-invalid in the OpenAI error shape, after the credential, billing, permission and body-size checks and before the request is decoded. |
X-Team-Idopcional | header | string The team the call acts for. Send it when the caller holds roles in more than one team: the platform cannot pick one, and without it the call is refused with 403 policy-denied. Leer másSend it also to act for one team on purpose: the models that are listed and may be called then follow that team's entitlements, and the quota and the usage are attributed to it. The team must be one the caller is an active member of: a team the caller does not belong to, an archived team and a malformed identifier are refused with 403 team-not-selectable. A caller whose roles are organization-wide needs no team. |
X-Organization-Idopcional | header | string The organization a signed-in person acts in, for a person who belongs to more than one. Leer másA person with exactly one organization needs no header; a person with several is refused with 403 organization-selection-required without it, and a value that names an organization the person holds no active membership in is refused with 403 organization-not-selectable. An API key carries its own organization and ignores the header, except a platform administrator's credential and a platform operator signed in at the backoffice, who may name any existing organization (an operator who names none holds the platform context, which these operations refuse with 403 organization-selection-required). The header selects among memberships that already exist: it never grants one, and the residency of the organization it selects must be the plane's own (403 residency-mismatch). |
Cuerpo de la solicitud application/json
modelstringobligatorioThe broad C0 model_ref vocabulary. Gateway routing additionally requires the stricter C7 identifier pattern ^[a-z][a-z0-9._-]{0,63}$; a C0-valid value that is not C7-routeable is refused with 400.
pattern ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$
messagesarray of ChatMessageobligatorioat least 1 items
rolestringopcionalcontentone ofopcionalThe message content, in the three shapes the OpenAI chat completions API defines: a string, null (for example an assistant message that only carries tool_calls), or an array of content parts (a text part and an image_url part at least; other part types are accepted and forwarded as sent). Where the gateway reads text from a message (the enrichment and guardrail input), a string is used as is, null is empty, and an array contributes its text parts in order, joined with a newline, ignoring every other part.
Uno de
#1stringopcional#2null or nullopcional#3array of ChatContentPartopcional
namestringopcionalForwarded.
tool_callsarray of objectopcionalForwarded (an assistant message that only carries tool calls has content null).
tool_call_idstringopcionalForwarded.
streambooleanopcionaltrue answers a text/event-stream response of chat.completion.chunk frames; false or omitted answers one application/json chat.completion object.
default false
stream_optionsobjectopcionalForwarded with include_usage forced to true, whatever the client sent; its other members pass.
temperaturenumberopcionalForwarded.
top_pnumberopcionalForwarded.
max_tokensintegeropcionalForwarded.
max_completion_tokensintegeropcionalForwarded.
stopone ofopcionalForwarded.
Uno de
#1stringopcional#2array of stringopcional
seedintegeropcionalForwarded.
nintegeropcionalForwarded.
presence_penaltynumberopcionalForwarded.
frequency_penaltynumberopcionalForwarded.
response_formatobjectopcionalForwarded.
toolsarray of objectopcionalForwarded; the tool calls of the answer come back in choices[].message.tool_calls.
tool_choiceone ofopcionalForwarded.
Uno de
#1stringopcional#2objectopcional
userstringopcionalForwarded.
Respuestas
- 200
With stream true, an SSE stream of ChatCompletionChunk objects ending with data: [DONE]; otherwise one ChatCompletion object.
Códigos de error:provider-credential-rejectedprovider-errorprovider-rate-limitedprovider-timeoutprovider-unavailableEsquema
ChatCompletionidstringobligatorioobjectstringobligatorioalways "chat.completion"
createdinteger (int64)obligatorioUnix time in seconds.
modelstringobligatorioThe catalog model id the request named.
choicesarray of ChatCompletionChoiceobligatorioindexintegerobligatorioat least 0
messageobjectobligatoriorolestringobligatoriocontentstring or nullobligatorioThe text; null when the model server answered with tool calls only.
tool_callsarray of ChatCompletionToolCallopcionalreasoningstring or nullopcionalPresent only when the model server sent reasoning.
reasoning_contentstring or nullopcionalThe same text as reasoning, under the name that clients of other providers read; present whenever reasoning is.
finish_reasonstring or nullobligatorioThe model server's reason (stop, length, tool_calls, ...), null when it sent none.
usageobjectobligatorioToken counts of the call. In a chunk it is the model server's own object and may carry further members; in a ChatCompletion it is the counts the platform metered, zeros when the model server reported none. A count of 0 can mean that the model server reported no usage for the call: the answer shows 0 because OpenAI clients require integers. The request log of the organization (GET /metering/v1/organizations/{org}/request-logs, control-metering-v1.json) says which: its measurement member is unknown (with measurement_reason) for a call whose usage was not reported, and measured for one whose counts are the model server's own.
prompt_tokensintegerobligatorioat least 0
completion_tokensintegerobligatorioat least 0
total_tokensintegerobligatorioat least 0
- 400
The request is refused before it is dispatched, or the model server refused it. invalid-request: a body that is not valid JSON (or not multipart/form-data with a boundary), a member of the wrong type, a missing or empty model, a chat request with no messages, an embeddings or speech request with no input (speech: not a string), an images request with no prompt (not a string), a decisions request with no state, with questions that are not a non-empty object, a message content that is not a string, null or an array, a transcription whose multipart body does not carry exactly one plain model field. session-id-invalid: a malformed or repeated X-Session-Id. provider-bad-request: images and decisions only, the model server refused the request with 400 and the message is its own, bounded and scrubbed of any credential.
Leer más
The refusals of the hop (a fault of the platform) are listed in x-ccsio-hop-error-codes.
Códigos de error:invalid-requestsession-id-invalid - 401
No credential, more than one, or one the platform does not accept: invalid-request (no credential, or both Authorization:
Leer más
Bearer and x-api-key), api-key-invalid, api-key-unknown, api-key-revoked, api-key-expired, the refusals of a bearer token (token-malformed, token-algorithm-unsupported, token-signature-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, token-claim-invalid), the trust in its issuer (issuer-untrusted, issuer-resolution-unknown, issuer-residency-mismatch, jwks-unavailable, jwks-invalid, jwks-key-not-found), a person with no account on this plane (identity-not-provisioned, organization-not-found) and, for a backoffice operator's token, staff-token-inactive, staff-not-operator and staff-directory-unavailable. The complete list is x-ccsio-boundary-error-codes. A 401 can also be a refusal of the hop between core and the router (missing-verified-context, invalid-verified-context, context-signature-*): that is a fault of the platform, not of the credential. Supply exactly one credential.
- 402
payment-required: the organization has no active subscription.
Leer más
The call is refused before its body is read; platform operators are exempt. credits-exhausted: the model is served from a third-party provider, the plane charges such models against prepaid credits, and the organization's balance is zero or negative; the organization tops up (or an operator credits it) and the next request is admitted. Streams already running finish. The model stays listed by GET /v1/models, which never answers credits-exhausted (and answers payment-required like every operation). The error type is invalid_request_error.
Códigos de error:credits-exhausted - 403
Refused by the platform after the credential was accepted: policy-denied (no role of the caller holds the permission, a personal API key whose owner lacks it, an acting team that is ambiguous or no longer authorized), tenant-mismatch (X-Tenant names another organization), team-not-selectable (X-Team-Id names a team the caller cannot act for), organization-inactive and the other states of the organization (organization-provisioning, organization-suspended, organization-disabled, organization-deleted), user-disabled, organization-selection-required (a person who belongs to several organizations and sent no X-Organization-Id, or a platform operator who selected none), organization-not-selectable, no-active-organization-membership, entitlement-denied (the organization or the acting team is not entitled to the model, which includes a model that does not exist), residency-mismatch (the organization, or the deployment's residency, does not match the plane's) or external-model-not-available (the model is served from a third-party provider and the organization is not admitted to such models: while a payment provider is configured and credits are not enabled only an organization that is billing-exempt or billed by contract is admitted; on a plane where credits are enabled the gate is credits-exhausted or model-not-priced instead, and this refusal is not answered; the model stays listed by GET /v1/models).
Códigos de error:entitlement-deniedexternal-model-not-availableorganization-inactiveresidency-mismatch - 404
model-not-found: the organization is entitled to the model but no active deployment serves it with the operation's capability. A chat or embeddings model on an audio route, and an audio model on any other route, is refused this way. A path under /v1/ that nothing claims is also a 404, with the code not-found.
Códigos de error:model-not-found - 405
method-not-allowed: the path is claimed but the request method is not allowed. The Allow header lists the methods the path accepts.
- 413
request-body-too-large: the request body exceeds the operation's cap (8388608 bytes for a JSON body, 26214400 for an audio transcription upload); answered after authentication and authorization (an unauthenticated or unauthorized request is refused first, without its body being read).
- 429
A concurrency or rate limit of the organization, the team, the model or the deployment was reached (organization-concurrency-exceeded, team-concurrency-exceeded, model-concurrency-exceeded, deployment-concurrency-exceeded, rate-limit-exceeded; entitlement-denied, which the router answers as a defense in depth when the model is outside the entitlements the hop carries and core has already checked), or the model server rate-limited the call (provider-rate-limited: audio, images, decisions, and chat with a stream; chat without a stream answers that case 503 provider-unavailable).
Leer más
The router knows when a retry may succeed, but the API host does not relay a Retry-After header: retry with backoff.
Códigos de error:deployment-concurrency-exceededentitlement-deniedmodel-concurrency-exceededorganization-concurrency-exceededprovider-rate-limitedrate-limit-exceededteam-concurrency-exceeded - 500
A failure of the platform, rendered without internal cause details: internal-error (core could not decide or load what the request needs), quota-store-unavailable (the router could not read its quota store, so the request was refused) and, for a fault of the hop, unsupported-protocol-version, deployment-not-active, tenant-mismatch, model-pin-mismatch, placement-mismatch, bundle-tenant-mismatch and upstream-endpoint-invalid.
Códigos de error:internal-errorquota-store-unavailable - 502
The model server failed or its answer could not be used: provider-error (it answered an error status other than a 429 that this operation passes on, or nothing usable; its own error body is never relayed), provider-credential-rejected (it answered 401 or 403 to the API key stored for the model's deployment), forwarder-failed (core could not reach the router), internal-hop-body (the router could not read the body core sent). The stored key never appears in any answer.
Códigos de error:forwarder-failedprovider-credential-rejectedprovider-error - 503
provider-unavailable (OpenAI shape): no deployment of the model is currently healthy, or the one deployment there is failed this very request with a 429, a 5xx or an answer that was not one (on chat without a stream, and on embeddings and non-streaming Responses, where it is rendered in the kernel envelope). model-not-priced (OpenAI shape, type server_error): the model is served from a third-party provider, the plane charges such models against prepaid credits and no price is set for the model in the plane's currency; nothing is dispatched. router-not-configured (the platform kernel envelope, the one deliberate exception of core): this deployment has no inference router at all.
Códigos de error:model-not-pricedprovider-unavailablerouter-not-configured - 504
provider-timeout: the dispatch deadline passed before the model server answered. Audio, images, decisions and chat; embeddings and Responses never answer 504.
Códigos de error:provider-timeout - 508
loop-detected: the request carried the X-Ccsio-Egress header, which the platform's own egress adds to every request it makes to a model provider. It is answered when a provider connection points back at the platform's own API; an ordinary client never meets it.
Códigos de error:loop-detected
/v1/embeddingsCreate embeddings
- Credencial
- API key
- Permiso
inference.invoke- Cuerpo de la solicitud
- Cuerpo de hasta 8 MiB
Creates embeddings through a qualified embeddings deployment.
Leer más
The request is forwarded to the model server as the client sent it, only model rewritten; the answer is rebuilt from the vectors the model server returned: object, data (object, embedding, index of each entry), model (the catalog model id the request named) and usage (zeros for all three fields when the model server reported none, which the request log's measurement then tells apart from a call that used nothing). A model server that answered 200 with no data is a 502 embedding-data-missing; one that refused the request with a 4xx other than 429 is a 502 embedding-body-malformed; one that answered a 429, a 5xx, a timeout or something that is not an embeddings body is a 503 provider-unavailable. All three are rendered in the kernel ErrorEnvelope: on this operation the answer does not tell a bad input from a failing server.
curl -X POST "https://api.latam.ccsio.ai/v1/embeddings" \
-H "Authorization: Bearer $CCSIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-embedding-0.6b",
"input": [
"The cat sleeps.",
"A kitten is napping."
]
}'Parámetros
| Nombre | En | Descripción |
|---|---|---|
X-Request-IDopcional | header | string Optional request ULID. Lowercase input is accepted; the response X-Request-ID header uses the canonical uppercase form. When the header is absent, or is not a ULID, the platform mints the id: no request is refused for it. |
X-Trace-IDopcional | header | string Optional trace correlation identifier. Any non-empty value is accepted and travels as a correlation label only, never as an authorization input; when it is absent the platform mints one. |
X-Residencyopcional | header | string Ignored. The residency a request is placed in is the organization's, never a header's: a value sent here changes nothing. Kept so that clients that still send it validate. |
X-Data-Regionopcional | header | string Ignored. The data region a request is placed in is the organization's, never a header's: a value sent here changes nothing. Kept so that clients that still send it validate. |
X-Session-Idopcional | header | string Optional client-provided session label, accepted on every /v1 operation. It groups the caller's requests in the request log (the session_id of the usage facts and of the request-log reads); it is a label only, never an identity, and is never used for authorization or tenancy. Leer másGrammar ^[A-Za-z0-9._:-]{1,128}$, given at most once: anything else (empty, longer than 128 characters, other characters, repeated) is refused 400 session-id-invalid in the OpenAI error shape, after the credential, billing, permission and body-size checks and before the request is decoded. |
X-Team-Idopcional | header | string The team the call acts for. Send it when the caller holds roles in more than one team: the platform cannot pick one, and without it the call is refused with 403 policy-denied. Leer másSend it also to act for one team on purpose: the models that are listed and may be called then follow that team's entitlements, and the quota and the usage are attributed to it. The team must be one the caller is an active member of: a team the caller does not belong to, an archived team and a malformed identifier are refused with 403 team-not-selectable. A caller whose roles are organization-wide needs no team. |
X-Organization-Idopcional | header | string The organization a signed-in person acts in, for a person who belongs to more than one. Leer másA person with exactly one organization needs no header; a person with several is refused with 403 organization-selection-required without it, and a value that names an organization the person holds no active membership in is refused with 403 organization-not-selectable. An API key carries its own organization and ignores the header, except a platform administrator's credential and a platform operator signed in at the backoffice, who may name any existing organization (an operator who names none holds the platform context, which these operations refuse with 403 organization-selection-required). The header selects among memberships that already exist: it never grants one, and the residency of the organization it selects must be the plane's own (403 residency-mismatch). |
Cuerpo de la solicitud application/json
modelstringobligatorioThe broad C0 model_ref vocabulary. Gateway routing additionally requires the stricter C7 identifier pattern ^[a-z][a-z0-9._-]{0,63}$; a C0-valid value that is not C7-routeable is refused with 400.
pattern ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$
inputone ofobligatorioWhat to embed, in any of the forms of the OpenAI API: a string, an array of strings, an array of token ids or an array of arrays of token ids. The platform checks that input is present and reads none of it; an empty one is the model server's to refuse.
Uno de
#1stringopcional#2array of stringopcional#3array of integeropcional#4array of array of integeropcional
encoding_formatstringopcionalForwarded. Only float vectors come back: the router decodes embedding as a list of numbers, so base64 fails the attempt and the call ends as 503 provider-unavailable.
Valores permitidos:
"float"dimensionsintegeropcionalForwarded.
userstringopcionalForwarded.
Respuestas
- 200
Embedding list and the usage from the metered provider attempt.
Esquema
EmbeddingsResponseobjectstringobligatorioalways "list"
dataarray of Embeddingobligatorioobjectstringobligatorioembeddingarray of number (double)obligatorioindexintegerobligatorio
modelstringobligatorioThe broad C0 model_ref vocabulary. Gateway routing additionally requires the stricter C7 identifier pattern ^[a-z][a-z0-9._-]{0,63}$; a C0-valid value that is not C7-routeable is refused with 400.
pattern ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$
usageobjectobligatorioToken counts the platform metered for the call: zeros when the model server reported none. A count of 0 can mean that the model server reported no usage for the call: the answer shows 0 because OpenAI clients require integers. The request log of the organization (GET /metering/v1/organizations/{org}/request-logs, control-metering-v1.json) says which: its measurement member is unknown (with measurement_reason) for a call whose usage was not reported, and measured for one whose counts are the model server's own.
prompt_tokensintegerobligatorioat least 0
completion_tokensintegerobligatorioat least 0
total_tokensintegerobligatorioat least 0
- 400
The request is refused before it is dispatched, or the model server refused it. invalid-request: a body that is not valid JSON (or not multipart/form-data with a boundary), a member of the wrong type, a missing or empty model, a chat request with no messages, an embeddings or speech request with no input (speech: not a string), an images request with no prompt (not a string), a decisions request with no state, with questions that are not a non-empty object, a message content that is not a string, null or an array, a transcription whose multipart body does not carry exactly one plain model field. session-id-invalid: a malformed or repeated X-Session-Id. provider-bad-request: images and decisions only, the model server refused the request with 400 and the message is its own, bounded and scrubbed of any credential.
Leer más
The refusals of the hop (a fault of the platform) are listed in x-ccsio-hop-error-codes.
Códigos de error:invalid-requestsession-id-invalid - 401
No credential, more than one, or one the platform does not accept: invalid-request (no credential, or both Authorization:
Leer más
Bearer and x-api-key), api-key-invalid, api-key-unknown, api-key-revoked, api-key-expired, the refusals of a bearer token (token-malformed, token-algorithm-unsupported, token-signature-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, token-claim-invalid), the trust in its issuer (issuer-untrusted, issuer-resolution-unknown, issuer-residency-mismatch, jwks-unavailable, jwks-invalid, jwks-key-not-found), a person with no account on this plane (identity-not-provisioned, organization-not-found) and, for a backoffice operator's token, staff-token-inactive, staff-not-operator and staff-directory-unavailable. The complete list is x-ccsio-boundary-error-codes. A 401 can also be a refusal of the hop between core and the router (missing-verified-context, invalid-verified-context, context-signature-*): that is a fault of the platform, not of the credential. Supply exactly one credential.
- 402
payment-required: the organization has no active subscription.
Leer más
The call is refused before its body is read; platform operators are exempt. credits-exhausted: the model is served from a third-party provider, the plane charges such models against prepaid credits, and the organization's balance is zero or negative; the organization tops up (or an operator credits it) and the next request is admitted. Streams already running finish. The model stays listed by GET /v1/models, which never answers credits-exhausted (and answers payment-required like every operation). The error type is invalid_request_error.
Códigos de error:credits-exhausted - 403
Refused by the platform after the credential was accepted: policy-denied (no role of the caller holds the permission, a personal API key whose owner lacks it, an acting team that is ambiguous or no longer authorized), tenant-mismatch (X-Tenant names another organization), team-not-selectable (X-Team-Id names a team the caller cannot act for), organization-inactive and the other states of the organization (organization-provisioning, organization-suspended, organization-disabled, organization-deleted), user-disabled, organization-selection-required (a person who belongs to several organizations and sent no X-Organization-Id, or a platform operator who selected none), organization-not-selectable, no-active-organization-membership, entitlement-denied (the organization or the acting team is not entitled to the model, which includes a model that does not exist), residency-mismatch (the organization, or the deployment's residency, does not match the plane's) or external-model-not-available (the model is served from a third-party provider and the organization is not admitted to such models: while a payment provider is configured and credits are not enabled only an organization that is billing-exempt or billed by contract is admitted; on a plane where credits are enabled the gate is credits-exhausted or model-not-priced instead, and this refusal is not answered; the model stays listed by GET /v1/models).
Códigos de error:entitlement-deniedexternal-model-not-availableorganization-inactiveresidency-mismatch - 404
model-not-found: the organization is entitled to the model but no active deployment serves it with the operation's capability. A chat or embeddings model on an audio route, and an audio model on any other route, is refused this way. A path under /v1/ that nothing claims is also a 404, with the code not-found.
Códigos de error:model-not-found - 405
method-not-allowed: the path is claimed but the request method is not allowed. The Allow header lists the methods the path accepts.
- 413
request-body-too-large: the request body exceeds the operation's cap (8388608 bytes for a JSON body, 26214400 for an audio transcription upload); answered after authentication and authorization (an unauthenticated or unauthorized request is refused first, without its body being read).
- 429
A concurrency or rate limit was reached on the router: organization-concurrency-exceeded, team-concurrency-exceeded, model-concurrency-exceeded, deployment-concurrency-exceeded or rate-limit-exceeded (entitlement-denied, a defense in depth when the model is outside the entitlements the hop carries).
Leer más
Rendered in the kernel ErrorEnvelope on this operation. The model server's own 429 is never answered here: it ends as 503 provider-unavailable. The API host does not relay a Retry-After header: retry with backoff.
Códigos de error:deployment-concurrency-exceededentitlement-deniedmodel-concurrency-exceededorganization-concurrency-exceededrate-limit-exceededteam-concurrency-exceeded - 500
A failure of the platform. Core renders internal-error in the OpenAI error shape; the router renders quota-store-unavailable (the quota store could not be read, so the request was refused) and the faults of the hop (unsupported-protocol-version, deployment-not-active, tenant-mismatch, model-pin-mismatch, placement-mismatch, bundle-tenant-mismatch, upstream-endpoint-invalid) in the kernel ErrorEnvelope.
Códigos de error:internal-errorquota-store-unavailable - 502
The model server refused the input or its answer could not be used.
Leer más
The router renders, in the kernel ErrorEnvelope, embedding-body-malformed and responses-body-malformed (the model server answered a 4xx other than a 429, which means it refused the request, or an answer that is not the body of this operation), embedding-data-missing and responses-output-missing (a 200 with no embedding data, or no output_text), and provider-credential-rejected (the provider refused the API key stored for the deployment; a fixed message that names neither the provider nor the key). A 429, a 5xx, a timeout or an answer that cannot be decoded is not a 502 here: it is a 503 provider-unavailable. Core renders forwarder-failed (it could not reach the router) in the OpenAI error shape, and the router's internal-hop-body in the kernel one.
Códigos de error:embedding-body-malformedembedding-data-missingforwarder-failedprovider-credential-rejected - 503
provider-unavailable (OpenAI shape): no deployment of the model is currently healthy, or the one deployment there is failed this very request with a 429, a 5xx or an answer that was not one (on chat without a stream, and on embeddings and non-streaming Responses, where it is rendered in the kernel envelope). model-not-priced (OpenAI shape, type server_error): the model is served from a third-party provider, the plane charges such models against prepaid credits and no price is set for the model in the plane's currency; nothing is dispatched. router-not-configured (the platform kernel envelope, the one deliberate exception of core): this deployment has no inference router at all.
Códigos de error:model-not-pricedprovider-unavailablerouter-not-configured - 508
loop-detected: the request carried the X-Ccsio-Egress header, which the platform's own egress adds to every request it makes to a model provider. It is answered when a provider connection points back at the platform's own API; an ordinary client never meets it.
Códigos de error:loop-detected
/v1/modelsList active published models
- Credencial
- API key
- Permiso
inference.read
Returns the models the caller's organization may call.
Leer más
A model is listed when the organization holds access to it (its own model-access entitlement, or a model group that reaches it), the restriction of the acting team (X-Team-Id) allows it, and an active deployment of it serves the organization's residency and data region. The list is deduplicated by model id and sorted by id, and each item names what the model can serve in capabilities. It is answered by core alone and does not need the inference router. Its only refusals of its own are 403 organization-inactive and entitlement-denied (an acting team that is ambiguous or no longer authorized) and 500 internal-error.
curl "https://api.latam.ccsio.ai/v1/models" \
-H "Authorization: Bearer $CCSIO_API_KEY"Parámetros
| Nombre | En | Descripción |
|---|---|---|
X-Request-IDopcional | header | string Optional case-insensitive ULID for model listing. Lowercase input is accepted and canonicalized to uppercase in the response X-Request-ID header; when the header is absent or invalid, middleware mints the request context and response id. |
X-Session-Idopcional | header | string Optional client-provided session label, accepted on every /v1 operation. It groups the caller's requests in the request log (the session_id of the usage facts and of the request-log reads); it is a label only, never an identity, and is never used for authorization or tenancy. Leer másGrammar ^[A-Za-z0-9._:-]{1,128}$, given at most once: anything else (empty, longer than 128 characters, other characters, repeated) is refused 400 session-id-invalid in the OpenAI error shape, after the credential, billing, permission and body-size checks and before the request is decoded. |
X-Team-Idopcional | header | string The team the call acts for. Send it when the caller holds roles in more than one team: the platform cannot pick one, and without it the call is refused with 403 policy-denied. Leer másSend it also to act for one team on purpose: the models that are listed and may be called then follow that team's entitlements, and the quota and the usage are attributed to it. The team must be one the caller is an active member of: a team the caller does not belong to, an archived team and a malformed identifier are refused with 403 team-not-selectable. A caller whose roles are organization-wide needs no team. |
X-Organization-Idopcional | header | string The organization a signed-in person acts in, for a person who belongs to more than one. Leer másA person with exactly one organization needs no header; a person with several is refused with 403 organization-selection-required without it, and a value that names an organization the person holds no active membership in is refused with 403 organization-not-selectable. An API key carries its own organization and ignores the header, except a platform administrator's credential and a platform operator signed in at the backoffice, who may name any existing organization (an operator who names none holds the platform context, which these operations refuse with 403 organization-selection-required). The header selects among memberships that already exist: it never grants one, and the residency of the organization it selects must be the plane's own (403 residency-mismatch). |
Respuestas
- 200
The tenant's model list.
Esquema
ModelsResponseobjectstringobligatorioalways "list"
dataarray of ModelobligatorioidstringobligatorioThe broad C0 model_ref vocabulary. Gateway routing additionally requires the stricter C7 identifier pattern ^[a-z][a-z0-9._-]{0,63}$; a C0-valid value that is not C7-routeable is refused with 400.
pattern ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$
objectstringobligatorioalways "model"
createdinteger (int64)obligatorioUnix timestamp from the creation time of the first active deployment that serves the model.
owned_bystringobligatorioalways "ccsio"
capabilitiesarray of stringobligatorioWhat the model can serve, in the capability matrix order. Always present; an empty array when the deployments carry no capability. The only way to tell chat models from embedding, audio, image and decision models.
Valores permitidos:
"chat-completions""embeddings""responses""audio-speech""audio-transcriptions""image-generations""decisions"
- 400
The request is refused before it is dispatched, or the model server refused it. invalid-request: a body that is not valid JSON (or not multipart/form-data with a boundary), a member of the wrong type, a missing or empty model, a chat request with no messages, an embeddings or speech request with no input (speech: not a string), an images request with no prompt (not a string), a decisions request with no state, with questions that are not a non-empty object, a message content that is not a string, null or an array, a transcription whose multipart body does not carry exactly one plain model field. session-id-invalid: a malformed or repeated X-Session-Id. provider-bad-request: images and decisions only, the model server refused the request with 400 and the message is its own, bounded and scrubbed of any credential.
Leer más
The refusals of the hop (a fault of the platform) are listed in x-ccsio-hop-error-codes.
Códigos de error:session-id-invalid - 401
No credential, more than one, or one the platform does not accept: invalid-request (no credential, or both Authorization:
Leer más
Bearer and x-api-key), api-key-invalid, api-key-unknown, api-key-revoked, api-key-expired, the refusals of a bearer token (token-malformed, token-algorithm-unsupported, token-signature-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, token-claim-invalid), the trust in its issuer (issuer-untrusted, issuer-resolution-unknown, issuer-residency-mismatch, jwks-unavailable, jwks-invalid, jwks-key-not-found), a person with no account on this plane (identity-not-provisioned, organization-not-found) and, for a backoffice operator's token, staff-token-inactive, staff-not-operator and staff-directory-unavailable. The complete list is x-ccsio-boundary-error-codes. A 401 can also be a refusal of the hop between core and the router (missing-verified-context, invalid-verified-context, context-signature-*): that is a fault of the platform, not of the credential. Supply exactly one credential.
- 402
payment-required: the organization has no active subscription.
Leer más
The call is refused before its body is read; platform operators are exempt. credits-exhausted: the model is served from a third-party provider, the plane charges such models against prepaid credits, and the organization's balance is zero or negative; the organization tops up (or an operator credits it) and the next request is admitted. Streams already running finish. The model stays listed by GET /v1/models, which never answers credits-exhausted (and answers payment-required like every operation). The error type is invalid_request_error.
- 403
Refused by the platform after the credential was accepted: policy-denied (no role of the caller holds the permission, a personal API key whose owner lacks it, an acting team that is ambiguous or no longer authorized), tenant-mismatch (X-Tenant names another organization), team-not-selectable (X-Team-Id names a team the caller cannot act for), organization-inactive and the other states of the organization (organization-provisioning, organization-suspended, organization-disabled, organization-deleted), user-disabled, organization-selection-required (a person who belongs to several organizations and sent no X-Organization-Id, or a platform operator who selected none), organization-not-selectable, no-active-organization-membership, entitlement-denied (the organization or the acting team is not entitled to the model, which includes a model that does not exist), residency-mismatch (the organization, or the deployment's residency, does not match the plane's) or external-model-not-available (the model is served from a third-party provider and the organization is not admitted to such models: while a payment provider is configured and credits are not enabled only an organization that is billing-exempt or billed by contract is admitted; on a plane where credits are enabled the gate is credits-exhausted or model-not-priced instead, and this refusal is not answered; the model stays listed by GET /v1/models).
Códigos de error:entitlement-deniedorganization-inactive - 405
method-not-allowed: the path is claimed but the request method is not allowed. The Allow header lists the methods the path accepts.
- 500
A failure of the platform, rendered without internal cause details: internal-error (core could not decide or load what the request needs), quota-store-unavailable (the router could not read its quota store, so the request was refused) and, for a fault of the hop, unsupported-protocol-version, deployment-not-active, tenant-mismatch, model-pin-mismatch, placement-mismatch, bundle-tenant-mismatch and upstream-endpoint-invalid.
Códigos de error:internal-error - 508
loop-detected: the request carried the X-Ccsio-Egress header, which the platform's own egress adds to every request it makes to a model provider. It is answered when a provider connection points back at the platform's own API; an ordinary client never meets it.
Códigos de error:loop-detected
/v1/responsesCreate a response (OpenAI-compatible)
- Credencial
- API key
- Permiso
inference.invoke- SSE
- Puede transmitir en streaming (server-sent events)
- Cuerpo de la solicitud
- Cuerpo de hasta 8 MiB
Creates a response through a qualified responses deployment. The request is forwarded to the model server as the client sent it, only model rewritten (see ResponsesRequest): the platform refuses no field and requires no input.
Leer más
The answer is one message item rebuilt from the output_text parts of the model server's answer, and usage (zeros when the model server reported none, which the request log's measurement then tells apart from a call that used nothing). A response the model server ends early (response.incomplete, or a non-streaming answer whose status is incomplete) is answered as incomplete, as OpenAI's Responses API does: status incomplete, incomplete_details.reason (for example max_output_tokens; null when the model server named none) and the usage it counted; a stream carries it as a response.incomplete frame in place of response.completed. Without a stream, a model server that refused the request with a 4xx other than 429, or answered something that is not a responses body, is a 502 responses-body-malformed; a 200 with no output_text is a 502 responses-output-missing, unless its status is incomplete (the output limit can be reached before any text: the answer is then incomplete with an empty text); a 429, a 5xx or a timeout is a 503 provider-unavailable. With a stream the 200 and the response.created frame are sent before the model server is asked, so every failure after that is one error frame that ends the stream: responses-stream-failed when the model server refused the request, provider-unavailable when it was unavailable.
curl -N -X POST "https://api.latam.ccsio.ai/v1/responses" \
-H "Authorization: Bearer $CCSIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-responses-model",
"instructions": "Answer in one short sentence.",
"input": "What is an API gateway?"
}'Parámetros
| Nombre | En | Descripción |
|---|---|---|
X-Request-IDopcional | header | string Optional request ULID. Lowercase input is accepted; the response X-Request-ID header uses the canonical uppercase form. When the header is absent, or is not a ULID, the platform mints the id: no request is refused for it. |
X-Trace-IDopcional | header | string Optional trace correlation identifier. Any non-empty value is accepted and travels as a correlation label only, never as an authorization input; when it is absent the platform mints one. |
X-Residencyopcional | header | string Ignored. The residency a request is placed in is the organization's, never a header's: a value sent here changes nothing. Kept so that clients that still send it validate. |
X-Data-Regionopcional | header | string Ignored. The data region a request is placed in is the organization's, never a header's: a value sent here changes nothing. Kept so that clients that still send it validate. |
X-Session-Idopcional | header | string Optional client-provided session label, accepted on every /v1 operation. It groups the caller's requests in the request log (the session_id of the usage facts and of the request-log reads); it is a label only, never an identity, and is never used for authorization or tenancy. Leer másGrammar ^[A-Za-z0-9._:-]{1,128}$, given at most once: anything else (empty, longer than 128 characters, other characters, repeated) is refused 400 session-id-invalid in the OpenAI error shape, after the credential, billing, permission and body-size checks and before the request is decoded. |
X-Team-Idopcional | header | string The team the call acts for. Send it when the caller holds roles in more than one team: the platform cannot pick one, and without it the call is refused with 403 policy-denied. Leer másSend it also to act for one team on purpose: the models that are listed and may be called then follow that team's entitlements, and the quota and the usage are attributed to it. The team must be one the caller is an active member of: a team the caller does not belong to, an archived team and a malformed identifier are refused with 403 team-not-selectable. A caller whose roles are organization-wide needs no team. |
X-Organization-Idopcional | header | string The organization a signed-in person acts in, for a person who belongs to more than one. Leer másA person with exactly one organization needs no header; a person with several is refused with 403 organization-selection-required without it, and a value that names an organization the person holds no active membership in is refused with 403 organization-not-selectable. An API key carries its own organization and ignores the header, except a platform administrator's credential and a platform operator signed in at the backoffice, who may name any existing organization (an operator who names none holds the platform context, which these operations refuse with 403 organization-selection-required). The header selects among memberships that already exist: it never grants one, and the residency of the organization it selects must be the plane's own (403 residency-mismatch). |
Cuerpo de la solicitud application/json
modelstringobligatorioThe broad C0 model_ref vocabulary. Gateway routing additionally requires the stricter C7 identifier pattern ^[a-z][a-z0-9._-]{0,63}$; a C0-valid value that is not C7-routeable is refused with 400.
pattern ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$
inputone ofopcionalWhat to answer: a string or an array of input items. Required by the Responses API; the platform does not check it (a request without it reaches the model server, which refuses it, and the call ends as 502 responses-body-malformed, or as an error frame when it is streamed).
Uno de
#1stringopcional#2array of ResponsesInputItemopcionaltypestringopcionalForwarded.
rolestringopcionalcontentone ofopcionalUno de
#1stringopcional#2array of ResponsesInputPartopcional
streambooleanopcionaltrue answers event-named SSE frames; false or omitted answers one application/json response object.
default false
instructionsstringopcionalForwarded.
temperaturenumberopcionalForwarded.
top_pnumberopcionalForwarded.
max_output_tokensintegeropcionalForwarded.
toolsarray of objectopcionalForwarded, not refused. The model server's tool calls do not come back.
tool_choiceone ofopcionalForwarded, not refused.
Uno de
#1stringopcional#2objectopcional
tool_usageobjectopcionalForwarded, not refused.
parallel_tool_callsbooleanopcionalForwarded, not refused.
previous_response_idstringopcionalForwarded, not refused. The platform keeps no response to continue from.
conversationone ofopcionalForwarded, not refused.
Uno de
#1stringopcional#2objectopcional
backgroundbooleanopcionalForwarded, not refused.
textobjectopcionalForwarded, not refused.
reasoningobjectopcionalForwarded, not refused. The reasoning items of the answer do not come back.
truncationstringopcionalForwarded, not refused.
safetyobjectopcionalForwarded, not refused.
storebooleanopcionalForwarded, not refused. The platform stores no response.
metadataobjectopcionalForwarded.
userstringopcionalForwarded.
Respuestas
- 200
The SSE stream (stream: true) or the final response object (stream: false).
Códigos de error:provider-credential-rejectedprovider-faultprovider-unavailableresponses-stream-failedEsquema
ResponsesResponseidstringobligatorioresp_ followed by the canonical ULID of the request's X-Request-ID.
pattern ^resp_[0-9A-HJKMNP-TV-Z]{26}$
objectstringobligatorioalways "response"
created_atintegerobligatorioat least 0
modelstringobligatorioThe broad C0 model_ref vocabulary. Gateway routing additionally requires the stricter C7 identifier pattern ^[a-z][a-z0-9._-]{0,63}$; a C0-valid value that is not C7-routeable is refused with 400.
pattern ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$
statusstringobligatoriocompleted, or incomplete when the model server ended the response before it was finished (the output limit, a content filter): incomplete_details then says why and usage is what the model server counted. The platform answers the state the model server reported, as OpenAI's Responses API does.
Valores permitidos:
"completed""incomplete"incomplete_detailsobject or nullopcionalAn object when status is incomplete; omitted when it is completed.
reasonstring or nullobligatorioThe reason the model server gave for ending the response early.
pattern ^[a-z0-9_.-]{1,64}$
outputarray of ResponsesMessageItemobligatoriotypestringobligatorioalways "message"
rolestringobligatorioalways "assistant"
contentarray of ResponsesOutputPartobligatorioat least 1 items
usageobjectobligatorioToken counts the platform metered for the call (total_tokens is input_tokens plus output_tokens): zeros when the model server reported none. A count of 0 can mean that the model server reported no usage for the call: the answer shows 0 because OpenAI clients require integers. The request log of the organization (GET /metering/v1/organizations/{org}/request-logs, control-metering-v1.json) says which: its measurement member is unknown (with measurement_reason) for a call whose usage was not reported, and measured for one whose counts are the model server's own.
input_tokensintegerobligatorioat least 0
output_tokensintegerobligatorioat least 0
total_tokensintegerobligatorioat least 0
- 400
The request is refused before it is dispatched, or the model server refused it. invalid-request: a body that is not valid JSON (or not multipart/form-data with a boundary), a member of the wrong type, a missing or empty model, a chat request with no messages, an embeddings or speech request with no input (speech: not a string), an images request with no prompt (not a string), a decisions request with no state, with questions that are not a non-empty object, a message content that is not a string, null or an array, a transcription whose multipart body does not carry exactly one plain model field. session-id-invalid: a malformed or repeated X-Session-Id. provider-bad-request: images and decisions only, the model server refused the request with 400 and the message is its own, bounded and scrubbed of any credential.
Leer más
The refusals of the hop (a fault of the platform) are listed in x-ccsio-hop-error-codes.
Códigos de error:invalid-requestsession-id-invalid - 401
No credential, more than one, or one the platform does not accept: invalid-request (no credential, or both Authorization:
Leer más
Bearer and x-api-key), api-key-invalid, api-key-unknown, api-key-revoked, api-key-expired, the refusals of a bearer token (token-malformed, token-algorithm-unsupported, token-signature-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, token-claim-invalid), the trust in its issuer (issuer-untrusted, issuer-resolution-unknown, issuer-residency-mismatch, jwks-unavailable, jwks-invalid, jwks-key-not-found), a person with no account on this plane (identity-not-provisioned, organization-not-found) and, for a backoffice operator's token, staff-token-inactive, staff-not-operator and staff-directory-unavailable. The complete list is x-ccsio-boundary-error-codes. A 401 can also be a refusal of the hop between core and the router (missing-verified-context, invalid-verified-context, context-signature-*): that is a fault of the platform, not of the credential. Supply exactly one credential.
- 402
payment-required: the organization has no active subscription.
Leer más
The call is refused before its body is read; platform operators are exempt. credits-exhausted: the model is served from a third-party provider, the plane charges such models against prepaid credits, and the organization's balance is zero or negative; the organization tops up (or an operator credits it) and the next request is admitted. Streams already running finish. The model stays listed by GET /v1/models, which never answers credits-exhausted (and answers payment-required like every operation). The error type is invalid_request_error.
Códigos de error:credits-exhausted - 403
Refused by the platform after the credential was accepted: policy-denied (no role of the caller holds the permission, a personal API key whose owner lacks it, an acting team that is ambiguous or no longer authorized), tenant-mismatch (X-Tenant names another organization), team-not-selectable (X-Team-Id names a team the caller cannot act for), organization-inactive and the other states of the organization (organization-provisioning, organization-suspended, organization-disabled, organization-deleted), user-disabled, organization-selection-required (a person who belongs to several organizations and sent no X-Organization-Id, or a platform operator who selected none), organization-not-selectable, no-active-organization-membership, entitlement-denied (the organization or the acting team is not entitled to the model, which includes a model that does not exist), residency-mismatch (the organization, or the deployment's residency, does not match the plane's) or external-model-not-available (the model is served from a third-party provider and the organization is not admitted to such models: while a payment provider is configured and credits are not enabled only an organization that is billing-exempt or billed by contract is admitted; on a plane where credits are enabled the gate is credits-exhausted or model-not-priced instead, and this refusal is not answered; the model stays listed by GET /v1/models).
Códigos de error:entitlement-deniedexternal-model-not-availableorganization-inactiveresidency-mismatch - 404
model-not-found: the organization is entitled to the model but no active deployment serves it with the operation's capability. A chat or embeddings model on an audio route, and an audio model on any other route, is refused this way. A path under /v1/ that nothing claims is also a 404, with the code not-found.
Códigos de error:model-not-found - 405
method-not-allowed: the path is claimed but the request method is not allowed. The Allow header lists the methods the path accepts.
- 413
request-body-too-large: the request body exceeds the operation's cap (8388608 bytes for a JSON body, 26214400 for an audio transcription upload); answered after authentication and authorization (an unauthenticated or unauthorized request is refused first, without its body being read).
- 429
A concurrency or rate limit was reached on the router: organization-concurrency-exceeded, team-concurrency-exceeded, model-concurrency-exceeded, deployment-concurrency-exceeded or rate-limit-exceeded (entitlement-denied, a defense in depth when the model is outside the entitlements the hop carries).
Leer más
Rendered in the kernel ErrorEnvelope on this operation. The model server's own 429 is never answered here: it ends as 503 provider-unavailable. The API host does not relay a Retry-After header: retry with backoff.
Códigos de error:deployment-concurrency-exceededentitlement-deniedmodel-concurrency-exceededorganization-concurrency-exceededrate-limit-exceededteam-concurrency-exceeded - 500
A failure of the platform. Core renders internal-error in the OpenAI error shape; the router renders quota-store-unavailable (the quota store could not be read, so the request was refused) and the faults of the hop (unsupported-protocol-version, deployment-not-active, tenant-mismatch, model-pin-mismatch, placement-mismatch, bundle-tenant-mismatch, upstream-endpoint-invalid) in the kernel ErrorEnvelope.
Códigos de error:internal-errorquota-store-unavailable - 502
The model server refused the input or its answer could not be used.
Leer más
The router renders, in the kernel ErrorEnvelope, embedding-body-malformed and responses-body-malformed (the model server answered a 4xx other than a 429, which means it refused the request, or an answer that is not the body of this operation), embedding-data-missing and responses-output-missing (a 200 with no embedding data, or no output_text), and provider-credential-rejected (the provider refused the API key stored for the deployment; a fixed message that names neither the provider nor the key). A 429, a 5xx, a timeout or an answer that cannot be decoded is not a 502 here: it is a 503 provider-unavailable. Core renders forwarder-failed (it could not reach the router) in the OpenAI error shape, and the router's internal-hop-body in the kernel one.
Códigos de error:forwarder-failedprovider-credential-rejectedresponses-body-malformedresponses-output-missing - 503
provider-unavailable (OpenAI shape): no deployment of the model is currently healthy, or the one deployment there is failed this very request with a 429, a 5xx or an answer that was not one (on chat without a stream, and on embeddings and non-streaming Responses, where it is rendered in the kernel envelope). model-not-priced (OpenAI shape, type server_error): the model is served from a third-party provider, the plane charges such models against prepaid credits and no price is set for the model in the plane's currency; nothing is dispatched. router-not-configured (the platform kernel envelope, the one deliberate exception of core): this deployment has no inference router at all.
Códigos de error:model-not-pricedprovider-unavailablerouter-not-configured - 508
loop-detected: the request carried the X-Ccsio-Egress header, which the platform's own egress adds to every request it makes to a model provider. It is answered when a provider connection points back at the platform's own API; an ordinary client never meets it.
Códigos de error:loop-detected
Generado a partir de los contratos de la plataforma en el commit 5f833620.