Input
Every capability endpoint reads the same three input fields. Send text for one input, texts for a batch, or image for a picture. The rest of the body names the decision: statement, labels, scale, question, schema, types, or field with value.
Every request needs an API key. See Authentication.
The three input fields
One input, 1 to 20,000 characters. Send this field or texts, never both.
A batch of 1 to 32 inputs. Each item takes the same 1 to 20,000 character limit.
One image, as base64 or a data URL. Send it instead of text, or with text. Never with texts.
See Images.
Every request carries one of these fields.
Send exactly one of text, texts or image. An image may travel with a text that gives it
context. text with texts returns 400 body: provide text, texts or image. image with
texts returns 400 image_with_texts. None of the three returns 400.
One text
Shape JSON records into text
The models read prose, not objects. Flatten a record into short labelled lines before you send it. Keep the field names that carry meaning. Drop ids, timestamps, and internal flags that no decision uses.
Three rules keep the input clean:
- Put one field on one line, as
Name: value. - Write values as they read to a person:
Team annual, notplan_id=3. - Keep the whole record under 2,000 characters when you can. The service chunks longer text.
Every character you send counts toward the character limit. The response header x-input-tokens reports the input tokens billed for this call. Cost grows with everything you send: the text plus the labels, statements, questions, or schema, at $0.04 per million input tokens. See Pricing.
Batching with texts
Send up to 32 inputs in texts. The response is always the batch envelope {"results": [...]}, with one entry per input, in the order you sent them. Match results to inputs by index.
That call reported x-input-chars: 73, the number of input characters, and x-input-tokens: 18, the input tokens billed for this call. The chars header counts the sum over all items in the batch.
Each text in texts costs one inference call. Batched statements or questions go into one call and add only their own length to the billed input. You pay $0.04 per million input tokens and $0 per output token. See Pricing.
Nested batches
On yes-no and answer you can batch both axes. texts with statements, or texts with questions, nests the envelope: an outer result per text, an inner result per statement or question.
Two texts by two statements take 0.49 s.
Read it as results[textIndex].results[statementIndex]. Both axes keep input order.
Input limits
Split anything over 20,000 characters yourself. The service chunks any text over 2,000 characters, and the merge rule differs per capability.
Next
- Long text and chunking — what happens above 2,000 characters.
- Batching — result ordering and how batches spread across inference slots.
- Decisions and probabilities — what comes back per capability.