Using LFM2.5-24B-A2B on Vercel AI Gateway

Implementation guide · LFM-2.5 · Liquid AI

ServerlessOpen Weights

Vercel AI Gateway exposes LFM2.5-24B-A2B through model ID liquid/lfm2.5-24b-a2b. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.

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

Quick Start

  1. 1
    Create an account at Vercel AI Gateway and generate an API key.
  2. 2
    Use the Vercel AI Gateway SDK or REST API to call liquid/lfm2.5-24b-a2b — see the documentation for request format.
  3. 3
    You'll be billed $0.05/1M input, $0.70/1M output tokens. See full pricing.

Code Examples

Install
pip install openai
API key
AI_GATEWAY_API_KEY
Model ID
liquid/lfm2.5-24b-a2b

creator/model-name e.g. kwaipilot/kat-coder-pro-v2

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/lfm2.5-24b-a2b",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Pricing on Vercel AI Gateway

TypePrice (per 1M)
Input tokens$0.05
Output tokens$0.70

Capabilities

ReasoningJSON / Tool useStructured OutputsPrompt Caching

About LFM2.5-24B-A2B

LFM2.5-24B-A2B is Liquid AI's largest LFM2.5 model: a 24B-parameter mixture-of-experts reasoning model with about 2B active parameters per token, built for fast on-device agents. It keeps the LFM2 hybrid of gated short convolutions and GQA (40 layers, 64 experts, top-4 routing), extends context from 32,768 to 131,072 tokens, doubles the vocabulary to 128K, and scales pre-training from 17T to 33T tokens. Unlike LFM2-24B-A2B, it is reasoning-only (explicit chain of thought before the final answer) and is post-trained for tool calling and multi-step agent harnesses.

Model Specs

Released2026-10-13
Parameters24B
Context128K
ArchitectureMixture of Experts

Provider

Vercel AI Gateway

Vercel