What is the difference between context window and output limit?
Context is the material Leiolai can work with: your instructions, questions, conversation history, and supplied text. Output is the answer Leiolai writes. Leiolai 1 supports an experimental context window of up to 11 million tokens. Finite API requests let you cap the answer length separately; experimental continuous generation has no fixed output-token ceiling.
Read the Leiolai API reference
What counts toward a context window?
The context is the material supplied for the request: instructions, conversation turns, questions, and source content. Leiolai’s published experimental limit is up to 11 million tokens.
Is a token the same as a word?
No. Tokens are the text units used to measure model context and API usage. Leiolai API billing reports token counts rather than page counts or a fixed number of words. Use reported usage when estimating charges for a real request.
Reported token usageCan I send a long source and ask for a short answer?
Yes. Give Leiolai the long source and request a concise summary, table, answer to one question, or list of requirements. Finite API formats also provide output caps.
Long-source questionsWhich fields cap a finite API response?
Leiolai Chat Completions uses max_completion_tokens, with max_tokens as a compatibility alias. Responses uses max_output_tokens. Anthropic Messages requires max_tokens. Text Completions also accepts max_tokens. Choose the field for your API format rather than sending several incompatible controls.
API formatsWhat does no fixed output ceiling mean?
Experimental Leiolai continuous generation keeps the session open without a fixed output-token ceiling and allows new context while the response runs. The session ends when you stop the session or when the available balance or API budget is exhausted.
Continuous generation controlsDoes ordinary streaming remove the output cap?
No. Streaming is a response-delivery choice for a finite API request. Continuous generation uses a separate Leiolai endpoint and event contract. A finite request with stream: true still follows that format’s output and completion controls.
Finite stream formatsIs the 2 MiB file limit the context size?
No. The Leiolai inline-file API accepts up to 2 MiB of UTF-8 text or code per file. The model’s context window concerns the whole request, including conversation history and supplied content.
Images and inline filesWhat should I do with a context-length error?
The Leiolai API reports context_length_exceeded when the request exceeds the available model context. Shorten the material or conversation and tool history sent in the request, while keeping the information needed for the task. Check the actual error code before changing output settings.
Request errors