# Liquid d1.2 on Vercel: classify audio without building a chatbot

Set up Liquid d1.2 decisions on Vercel AI Gateway, handle audio and image boxes, compare pricing, and keep classification separate from approval.

By Paras Madan | 2026-11-20


A support voicemail does not always need a generated reply. Sometimes the useful first step is simpler: identify whether the caller wants a replacement, then put the recording in the right review queue.

Liquid's d1.2 models now have a concrete integration for that job on Vercel AI Gateway. The interesting change is audio and image-location support inside a typed decision workflow, not another model to add to a chat dropdown.

## What actually changed

Liquid released d1.2 and d1.2-ultra on November 16. Vercel announced their Gateway availability on November 19, including audio inputs and bounding boxes. The Gateway identifiers are `liquid/d1.2` and `liquid/d1.2-ultra`. These are decision models: the answer is a probability, category or score rather than a paragraph. [Vercel announcement](https://vercel.com/changelog/liquid-ais-d1-2-and-d1-2-ultra-are-now-available-on-ai-gateway).

I would start with an internal triage queue. The model suggests where a request belongs; your existing support process still decides what to do about it. That gives you a useful deployment target without making the classifier responsible for refunds, account access or other consequential actions.

## Start with one audio question

Use AI SDK 7 with `ai` version 7.0.136 or later for this audio example. Set `AI_GATEWAY_API_KEY` in the server environment, then pass the recording as a file part in `state`.

```ts
import { readFile } from 'node:fs/promises';
import { experimental_decide as decide } from 'ai';

const result = await decide({
  model: 'liquid/d1.2',
  state: [{
    type: 'file',
    mediaType: 'audio/flac',
    data: await readFile('support-call.flac'),
  }],
  questions: {
    replacement: {
      type: 'boolean',
      instructions: 'Is the caller requesting a replacement product?',
    },
  },
});

console.log(result.answers.replacement.probability);
```

Use a recording you are permitted to process, and keep the API key out of browser code. For an initial pilot, save the suggested label alongside the support worker's actual decision rather than changing the live queue immediately.

## Keep the request formats straight

The SDK's `questions` field is an object, and a Boolean answer uses `type: 'boolean'`. Gateway's HTTP Decisions endpoint uses an array of named questions and calls that question type `predicate`. Decision models are not served through its Chat Completions or Responses endpoints.

Another migration trap: from `ai` 7.0.133, an array in `state` means ordered content parts. A JSON array of messages should go inside an object or a `json` part, not be passed as though it were a file-parts list. [Decision documentation](https://vercel.com/docs/ai-gateway/modalities/decision).

Give the adapter a small contract test before connecting the queue: one known recording, one expected answer key, a numeric probability, and an explicit failure path. A missing answer should not silently become “no replacement requested.”

## Treat image boxes as coordinates, not verdicts

Vercel's box answers express top and bottom relative to image height, and left and right relative to width. Convert those fractions using the dimensions of the image that was actually submitted.

For a returns workflow, I would display the proposed location over the original product photo for review. If your app resizes or crops uploads, retain the transformation so the overlay lands in the right place. A confidently drawn rectangle over the wrong region is still a broken feature.

Finding a mark or object does not establish that a document is authentic, a product is defective or a claim should be accepted. Those are separate questions requiring separate evidence.

## Price the route you actually use

Liquid lists direct-API input pricing of $0.02 per million tokens for d1.2 and $0.042 for ultra, with input-only billing. Its announcement also describes newer extraction tasks, but do not assume every direct-API answer type has identical support in every integration. [Liquid release details](https://www.liquid.ai/blog/d1-2).

Vercel's ultra model page displays $0.04 per million input tokens. That differs in displayed precision from Liquid's $0.042 figure. Check the route's usage records rather than treating either display as an interchangeable invoice estimate. [Gateway ultra pricing](https://vercel.com/ai-gateway/models/liquid/d1.2-ultra).

For the pilot, record cost per completed case, including retries. Compare both models on the same recordings and keep latency separate from accuracy. A lower token bill is not much of a saving if the review team spends longer correcting the labels.

## Decide what earns a rollout

Build a small labelled set with clear requests, ambiguous requests, silence, background noise and recordings in the languages your customers actually use. Keep the labels fixed while comparing models.

Measure wrong queue assignments and missed requests separately. Choose review thresholds from those results, not from a probability that looks reassuring in one demo. My rollout preference is shadow labels first, suggested routing second, and only then narrowly scoped automation with an easy rollback.

I'm Paras. I work at the intersection of AI, engineering and distribution.

I help AI teams turn integration details into clear technical writing and product stories that developers can use.

[Book a 30-minute call](https://cal.com/paras-madan/30min).
