{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/cloudflare/main/json-schema/cloudflare-ai-run-request-schema.json", "title": "AiRunRequest", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/cloudflare-ai-inference-api-openapi.yml#/components/schemas/AiRunRequest", "type": "object", "properties": { "prompt": { "type": "string", "description": "The input prompt for text generation models." }, "messages": { "type": "array", "description": "Array of messages for chat-style models.", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "system", "user", "assistant" ] }, "content": { "type": "string" } } } }, "image": { "type": "array", "items": { "type": "integer" }, "description": "Raw image bytes for image classification models." }, "text": { "type": "string", "description": "Text input for embedding or translation models." }, "source_lang": { "type": "string", "description": "Source language code for translation." }, "target_lang": { "type": "string", "description": "Target language code for translation." }, "max_tokens": { "type": "integer", "description": "Maximum number of tokens to generate." }, "temperature": { "type": "number", "description": "Sampling temperature." }, "stream": { "type": "boolean", "description": "Whether to stream the response using server-sent events." } } }