Decisions
- Request size. The whole request must fit your plan’s context: about 32K tokens, or 128K with extended context (see Pricing). That counts content, instructions, options, rubric lines, list items, tags and search results. Very long content can return 503 first, so stay well under the limit.
- Images. At most 4 MiB decoded, 8192 px on the longest edge, 4096² pixels in total. Remote URLs, Sort, list items and grounding are not supported.
Extraction
- Up to 64 fields per request, 64 documents per batch.
- Field names and questions: up to 256 characters, no double quotes or line breaks, unique ignoring case (
_counts as a space). - Definitions: up to 4,000 characters.
- Content plus definitions: up to 16,384 tokens. Longer returns 413: split the document and send the parts as a batch.
Streaming
- Text plus questions: up to 16,384 tokens. An
appendpast it is refused withcode: "prompt_too_long", and the session stays open. - 600,000 characters and 32 questions per session.
- A session with no frame from you for 300 seconds closes. Send
pingto keep it open.
LLMs
- Context: each model’s own, listed on the Models page. See Long prompts.
- A call that sends nothing back for 120 seconds is cut off. For long answers, set
"stream": true.