Textcortex Chat Completions API
Generate chat completions with TextCortex models.
Generate chat completions with TextCortex models.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/textcortex-chat-completions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: OpenAI-compatible TextCortex API for model discovery, chat completions, and responses.
title: TextCortex Balance Chat Completions API
version: 1.2026.07.20
servers:
- description: Production server
url: https://api.textcortex.com/v1
security:
- BearerAuth: []
tags:
- description: Generate chat completions with TextCortex models.
name: Chat Completions
paths:
/chat/completions:
post:
description: Creates a chat completion using an OpenAI-compatible request body. Use model ids returned by `GET /models`.
operationId: createChatCompletion
requestBody:
content:
application/json:
examples:
basic:
summary: Basic chat completion
value:
max_tokens: 128
messages:
- content: Write a short product tagline.
role: user
model: kimi-k2-5
streaming:
summary: Streaming chat completion
value:
messages:
- content: Explain API credits in one paragraph.
role: user
model: kimi-k2-5
stream: true
schema:
$ref: '#/components/schemas/ChatCompletionRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionResponse'
text/event-stream:
schema:
description: Server-sent event stream containing chat completion chunks.
type: string
description: Chat completion response
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
description: Invalid request body
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
description: Missing or invalid API key
'402':
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
description: Insufficient API credits
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
description: Unknown model
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
description: Chat completion failed
summary: Create a chat completion
tags:
- Chat Completions
components:
schemas:
ChatCompletionRequest:
additionalProperties: false
properties:
audio:
additionalProperties: true
type:
- object
- 'null'
frequency_penalty:
maximum: 2
minimum: -2
type:
- number
- 'null'
function_call:
oneOf:
- type: string
- type: object
functions:
items:
type: object
type:
- array
- 'null'
logit_bias:
additionalProperties:
type: number
type:
- object
- 'null'
logprobs:
type:
- boolean
- 'null'
max_completion_tokens:
minimum: 1
type:
- integer
- 'null'
max_tokens:
minimum: 1
type:
- integer
- 'null'
messages:
items:
$ref: '#/components/schemas/ChatMessage'
minItems: 1
type: array
metadata:
additionalProperties: true
type:
- object
- 'null'
modalities:
items:
type: string
type:
- array
- 'null'
model:
description: Model id returned by `GET /models`.
example: kimi-k2-5
type: string
n:
minimum: 1
type:
- integer
- 'null'
parallel_tool_calls:
type:
- boolean
- 'null'
prediction:
additionalProperties: true
type:
- object
- 'null'
presence_penalty:
maximum: 2
minimum: -2
type:
- number
- 'null'
prompt_cache_key:
type:
- string
- 'null'
prompt_cache_retention:
type:
- string
- 'null'
reasoning:
type:
- object
- 'null'
reasoning_effort:
type:
- string
- 'null'
response_format:
type:
- object
- 'null'
safety_identifier:
type:
- string
- 'null'
seed:
type:
- integer
- 'null'
service_tier:
type:
- string
- 'null'
stop:
oneOf:
- type: string
- items:
type: string
type: array
store:
type:
- boolean
- 'null'
stream:
default: false
type:
- boolean
- 'null'
stream_options:
additionalProperties: true
properties:
include_usage:
type: boolean
type:
- object
- 'null'
temperature:
maximum: 2
minimum: 0
type:
- number
- 'null'
tool_choice:
oneOf:
- type: string
- type: object
tools:
items:
type: object
type:
- array
- 'null'
top_logprobs:
minimum: 0
type:
- integer
- 'null'
top_p:
maximum: 1
minimum: 0
type:
- number
- 'null'
user:
type:
- string
- 'null'
verbosity:
type:
- string
- 'null'
web_search_options:
additionalProperties: true
type:
- object
- 'null'
required:
- model
- messages
type: object
PromptTokensDetails:
additionalProperties: true
properties:
cached_tokens:
description: Prompt tokens served from cache for this request.
type: integer
type: object
ChatCompletionChoice:
additionalProperties: true
properties:
finish_reason:
type:
- string
- 'null'
index:
type: integer
message:
$ref: '#/components/schemas/ChatMessage'
type: object
ChatCompletionResponse:
additionalProperties: true
properties:
choices:
items:
$ref: '#/components/schemas/ChatCompletionChoice'
type: array
created:
type: integer
id:
type: string
model:
type: string
object:
type: string
usage:
$ref: '#/components/schemas/ChatCompletionUsage'
required:
- id
- object
- created
- model
- choices
type: object
ChatMessageContentPart:
additionalProperties: true
properties:
image_url:
properties:
url:
type: string
type: object
text:
type: string
type:
description: Content part type.
example: text
type: string
required:
- type
type: object
ChatMessage:
additionalProperties: true
properties:
content:
oneOf:
- type:
- string
- 'null'
- items:
$ref: '#/components/schemas/ChatMessageContentPart'
type: array
name:
type: string
role:
enum:
- system
- user
- assistant
- tool
type: string
tool_call_id:
type: string
tool_calls:
items:
additionalProperties: true
type: object
type:
- array
- 'null'
required:
- role
type: object
OpenAIError:
properties:
error:
properties:
code:
type:
- string
- 'null'
message:
type: string
param:
type:
- string
- 'null'
type:
enum:
- invalid_request_error
- server_error
type: string
required:
- message
- type
type: object
required:
- error
type: object
ChatCompletionUsage:
additionalProperties: true
properties:
completion_tokens:
type: integer
prompt_tokens:
type: integer
prompt_tokens_details:
$ref: '#/components/schemas/PromptTokensDetails'
total_tokens:
type: integer
type: object
securitySchemes:
BearerAuth:
bearerFormat: API key
description: 'Send `Authorization: Bearer <api_key>`.'
scheme: bearer
type: http