About
Liquid d1-ultra evaluates text, structured JSON, and images for classification, routing, scoring, and visual inspection. It is served by Liquid and returns typed decisions and probabilities for Noul, Choice, and Score questions. Up to eight embedded images can accompany the state, subject to the official request-size and image-patch limits. Each question is billed for its input and images; the API reports zero output tokens.
1. Calling the API
Setup your API Key
To begin using Infron, create an account and generate your API Key.
export INFRON_KEY="YOUR_API_KEY"
Submit a request
Send JSON to POST https://llm.onerouter.pro/v1/decisions using your Infron API key. This is a runnable request example; route availability depends on your deployment.
curl --request POST "https://llm.onerouter.pro/v1/decisions" \
--header "Authorization: Bearer $INFRON_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "liquid/d1-ultra",
"state": "A customer reports being charged twice and asks for a refund today.",
"questions": {
"billing": {
"type": "noul",
"instructions": "Is this request about billing?"
},
"team": {
"type": "choice",
"instructions": "Which team should handle it?",
"criteria": {
"billing": "Payments and refunds",
"technical": "Software support"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"Can wait",
"Handle today",
"Immediate emergency"
]
}
},
"provider": {
"only": [
"liquid"
],
"allow_fallbacks": false
},
"usage": {
"include": true
}
}'
Response
The following single-answer response illustrates the schema. Its request ID, probabilities, and usage are placeholders, not a captured call.
{
"id": "request_id_example",
"request_id": "request_id_example",
"model": "liquid/d1-ultra",
"answers": {
"billing": {
"type": "noul",
"noul": 0.97
}
},
"usage": {
"input_tokens": 100,
"output_tokens": 0
}
}
Routing and usage
provider and usage.include are Infron fields. They are not forwarded to the upstream provider. Set provider.only to ["liquid"] and provider.service_tier to "standard" to select this route. usage.include=true includes cost information. Charges use the actual upstream usage.input_tokens; output tokens are free and their actual count is preserved. Every question is billed for its text and all supplied images. Output usage is reported as zero by the official API.
Errors
Invalid parameter types or configured limits are rejected before the upstream request. Provider authentication, account, context, and media errors propagate through the existing gateway error handling. The service does not silently truncate the configured question or image arrays. Streaming and asynchronous task polling are unavailable.
2. Schema
Input
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
model | string | Yes | -- | liquid/d1-ultra | Public model ID; upstream selector is d1-ultra. |
state | string / object / array | Yes | -- | See provider contract | Shared content for the questions. |
questions | object | Yes | -- | At least one entry | Named questions; names are retained in the response. |
questions.<id>.type | string | Yes | -- | noul, choice, score | Question type. |
questions.<id>.instructions | string / object / array | Yes | -- | See Question types | What to evaluate; no default is injected. |
questions.<id>.criteria | object / array | For choice and score | -- | See Question types | Options or an ordered rubric. |
images | array | No | -- | 0–8 images | Embedded image data; see Media inputs. |
provider | object | No | -- | -- | Platform routing options. |
usage.include | boolean | No | false | true, false | Include platform cost details. |
Question types
Noul returns a yes probability. Choice accepts one or more options; Score accepts one or more ordered levels, indexed from zero. Choice requires an option map; Score requires an array. Instructions and criteria describe the task according to the upstream contract; Noul requires a meaningful question through instructions or criteria. The reviewed hosted API documentation does not publish an exact context limit.
Media inputs
Supply up to eight JPEG, PNG, WebP, or GIF images in images, as data URLs or objects containing content_type and base64. Remote URLs are unsupported. The complete request must stay under 4.5 MB; images together may use at most 10,000 patches of 32 × 32 pixels, and the longest image side may not exceed 100 times the shortest. Image tokens are included in the upstream input usage.
Output
| Parameter | Type | Range | Description |
|---|---|---|---|
id, request_id | string | -- | Platform request ID. |
model | string | -- | Public model ID. |
provider, service_tier | string | -- | Selected route. |
answers | object | Request question IDs | Typed upstream answers. |
answers.<id>.type | string | noul, choice, score | Answer type. |
answers.<id>.noul | number | 0–1 | Yes probability. |
answers.<id>.choice | string | Choice keys | Selected option. |
answers.<id>.score | number | 0 to levels minus 1 | Probability-weighted level. |
answers.<id>.confidence | number | 0–1 | Choice/Score confidence. |
answers.<id>.probabilities | object | Values 0–1 | Probability distribution. |
answers.<id>.legend | object | -- | Score level descriptions. |
usage.input_tokens, usage.output_tokens | integer | Non-negative | Actual upstream usage. |
cost | number | USD | Charge details when requested. |
cost_details | object | -- | Billing breakdown when requested. |
3. Detailed Pricing
| Model | Billing unit | Input price | Output price |
|---|---|---|---|
| Liquid d1-ultra | Per 1 million tokens | $0.042 | Free |
This is the undiscounted base price; no promotional discount is configured. Charges use the actual upstream usage.input_tokens; output tokens are free and their actual count is preserved. Every question is billed for its text and all supplied images. Output usage is reported as zero by the official API. Official pricing.