Moonshot AI · Schema
EstimateTokenRequest
Artificial IntelligenceLLMInferenceLong ContextKimiFoundation Models
Properties
| Name | Type | Description |
|---|---|---|
| model | string | Model ID |
| messages | array | A list of messages in the conversation so far. Each element has the format {"role": "user", "content": "Hello"}. role supports system, user, or assistant. content must not be empty |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/moonshot-ai/main/json-schema/moonshot-ai-estimate-token-request-schema.json",
"title": "EstimateTokenRequest",
"x-generated": "2026-10-13",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/moonshot-ai-utilities-api-openapi.yml#/components/schemas/EstimateTokenRequest",
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID",
"default": "kimi-k2.5",
"enum": [
"kimi-k2.6",
"kimi-k2.5",
"kimi-k2-0905-preview",
"kimi-k2-0711-preview",
"kimi-k2-turbo-preview",
"moonshot-v1-8k",
"moonshot-v1-32k",
"moonshot-v1-128k",
"moonshot-v1-auto",
"moonshot-v1-8k-vision-preview",
"moonshot-v1-32k-vision-preview",
"moonshot-v1-128k-vision-preview"
]
},
"messages": {
"type": "array",
"description": "A list of messages in the conversation so far. Each element has the format {\"role\": \"user\", \"content\": \"Hello\"}. role supports system, user, or assistant. content must not be empty",
"items": {
"$ref": "#/$defs/Message"
}
}
},
"required": [
"model",
"messages"
],
"$defs": {
"Message": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
],
"description": "The role of the message sender"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"title": "text",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
},
"text": {
"type": "string"
}
},
"required": [
"type",
"text"
]
},
{
"title": "image_url",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"image_url"
]
},
"image_url": {
"oneOf": [
{
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
},
{
"type": "string"
}
]
}
},
"required": [
"type",
"image_url"
]
},
{
"title": "video_url",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"video_url"
]
},
"video_url": {
"oneOf": [
{
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
},
{
"type": "string"
}
]
}
},
"required": [
"type",
"video_url"
]
}
]
}
}
],
"description": "The content of the message. Can be a plain text string, or an array of objects with text/image_url/video_url types (for multimodal input)"
},
"name": {
"type": "string",
"default": null,
"description": "Optional name for the message sender"
},
"partial": {
"type": "boolean",
"default": false,
"description": "Enable Partial Mode by setting this to true in the last assistant message"
}
},
"required": [
"role",
"content"
]
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.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.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/moonshot-ai-estimate-token-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
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.