d1 on Vercel AI Gateway

d1 · Liquid AI

Serverless

Last refreshed 2026-10-05. Next refresh: weekly.

Why use d1 on Vercel AI Gateway?

Vercel AI Gateway offers d1 with pay-as-you-go pricing at $0.04/1M input tokens. Vercel AI Gateway is a unified AI proxy providing a single OpenAI-compatible API endpoint to 275+ models from 25+ providers including Anthropic, OpenAI, Google, Meta, Mistral, DeepSeek, xAI, Alibaba, Amazon, ByteDance, Cohere, MiniMax, MoonshotAI, KwaiPilot, Black Forest Labs, Recraft, Voyage AI, NVIDIA, and more.

Compare d1 across 3 providers to find the best fit for your use case
Input / 1M
$0.040
Output / 1M
Free
Cache
Not sourced
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install openai
Auth
export AI_GATEWAY_API_KEY=...
Call
import os
from openai import OpenAI
client = OpenAI(
    api_key=os.environ["AI_GATEWAY_API_KEY"],
Model ID
liquid/d1

Request example

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AI_GATEWAY_API_KEY"],
    base_url="https://ai-gateway.vercel.sh/v1"
)
response = client.chat.completions.create(
    model="liquid/d1",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Gotchas

  • Use provider model ID "liquid/d1", not the LLMReference slug "d1".
  • creator/model-name e.g. kwaipilot/kat-coder-pro-v2
  • The examples expect AI_GATEWAY_API_KEY; rename it only if your application config maps the new variable.

Compare d1 Across Providers

ProviderInput (per 1M)Output (per 1M)
Liquid AI$0.04Free
Vercel AI Gateway$0.04Free
OpenRouter$0.04Free

Pricing

TypePrice (per 1M)
Input tokens$0.04
Output tokensFree

Capabilities

VisionMultimodalStructured Outputs

About d1

d1 is Liquid AI's first decision model. It reads unstructured input (text, images or both) plus one or more typed questions (Noul yes/no, Choice, Score) in a single forward pass and returns calibrated probabilities, generating no output tokens, via POST https://api.liquid.ai/decisions/v1/systemone (TypeSafe SDK-compatible). Liquid gives text decisions as 200–300 ms. Released 2026-09-22 (text). Image input was added 2026-10-05 on the Liquid API under the paid id d1: JPEG/PNG/WebP/GIF, up to 8 images and 10,000 32×32 patches per request, billed as input tokens at 1.5 tokens per patch.

Get Started