---
title: LiquidAI: LFM2 24B A2B API | Text Generation | ModelsLab
description: Build with LiquidAI: LFM2 24B A2B API by Liquid. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab.com/models/liquid/liquid-lfm-2-24b-a2b/api.md
canonical: https://modelslab.com/models/liquid/liquid-lfm-2-24b-a2b/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-04-15T04:02:03.844085Z
---

LiquidAI: LFM2-24B-A2B
---

 [LLMs.txt](https://modelslab.com/models/open_router/liquid-lfm-2-24b-a2b/llms.txt) [.md](https://modelslab.com/models/liquid/liquid-lfm-2-24b-a2b.md)

liquid-lfm-2-24b-a2b liquid Closed Source Model $0.075000 / call

LiquidAI: LFM2-24B-A2B
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### LiquidAI: LFM2-24B-A2B

liquid liquid-lfm-2-24b-a2b

Copy model ID

PricingInput $0.03 / 1M tokens

Output $0.12 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[AA](https://modelslab.com/models/open_router/aion-labs-aion-2.0)[Open Router](https://modelslab.com/models/open_router)

 [AionLabs: Aion-2.0

Closed Source Model](https://modelslab.com/models/open_router/aion-labs-aion-2.0)

[OG](https://modelslab.com/models/open_router/openai-gpt-oss-20b)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: gpt-oss-20b

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-oss-20b)

[ZG](https://modelslab.com/models/open_router/z-ai-glm-5)[Open Router](https://modelslab.com/models/open_router)

 [Z.ai: GLM 5

Closed Source Model](https://modelslab.com/models/open_router/z-ai-glm-5)

[AC](https://modelslab.com/models/open_router/anthropic-claude-3.7-sonnet)[Open Router](https://modelslab.com/models/open_router)

 [Anthropic: Claude 3.7 Sonnet

Closed Source Model](https://modelslab.com/models/open_router/anthropic-claude-3.7-sonnet)

[AA](https://modelslab.com/models/open_router/arcee-ai-maestro-reasoning)[Open Router](https://modelslab.com/models/open_router)

 [Arcee AI: Maestro Reasoning

Closed Source Model](https://modelslab.com/models/open_router/arcee-ai-maestro-reasoning)

[DV](https://modelslab.com/models/deepseek/deepseek-ai-DeepSeek-V3)[ModelsLab](https://modelslab.com/models/deepseek)

 [DeepSeek V3-0324

Closed Source Model](https://modelslab.com/models/deepseek/deepseek-ai-DeepSeek-V3)

[MM](https://modelslab.com/models/together_ai/MiniMaxAI-MiniMax-M2)[Together AI](https://modelslab.com/models/together_ai)

 [MiniMax M2

Closed Source Model](https://modelslab.com/models/together_ai/MiniMaxAI-MiniMax-M2)

[DD](https://modelslab.com/models/open_router/deepseek-deepseek-v3.2-speciale)[Open Router](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V3.2 Speciale

Closed Source Model](https://modelslab.com/models/open_router/deepseek-deepseek-v3.2-speciale)

[G3](https://modelslab.com/models/google_deepmind/google-gemma-3n-E4B-it)[ModelsLab](https://modelslab.com/models/google_deepmind)

 [Gemma 3N E4B Instruct

Closed Source Model](https://modelslab.com/models/google_deepmind/google-gemma-3n-E4B-it)

[MM](https://modelslab.com/models/together_ai/MiniMaxAI-MiniMax-M2.5-FP4)[Together AI](https://modelslab.com/models/together_ai)

 [MiniMax M2.5 FP4

Closed Source Model](https://modelslab.com/models/together_ai/MiniMaxAI-MiniMax-M2.5-FP4)

[D1](https://modelslab.com/models/together_ai/agentica-org-DeepCoder-14B-Preview)[Together AI](https://modelslab.com/models/together_ai)

 [Deepcoder 14B Preview

Closed Source Model](https://modelslab.com/models/together_ai/agentica-org-DeepCoder-14B-Preview)

[LL](https://modelslab.com/models/open_router/liquid-lfm-2.5-1.2b-thinking-free)[Open Router](https://modelslab.com/models/open_router)

 [LiquidAI: LFM2.5-1.2B-Thinking (free)

Closed Source Model](https://modelslab.com/models/open_router/liquid-lfm-2.5-1.2b-thinking-free)

[ML](https://modelslab.com/models/open_router/meta-llama-llama-3.3-70b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Meta: Llama 3.3 70B Instruct

Closed Source Model](https://modelslab.com/models/open_router/meta-llama-llama-3.3-70b-instruct)

[AC](https://modelslab.com/models/open_router/anthropic-claude-3.5-haiku)[Open Router](https://modelslab.com/models/open_router)

 [Anthropic: Claude 3.5 Haiku

Closed Source Model](https://modelslab.com/models/open_router/anthropic-claude-3.5-haiku)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3-vl-8b-thinking)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 VL 8B Thinking

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen3-vl-8b-thinking)

[Q4](https://modelslab.com/models/together_ai/Qwen-Qwen3-4B-Base)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3 4B Base

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen3-4B-Base)

[QQ](https://modelslab.com/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)[Alibaba](https://modelslab.com/models/alibaba_cloud)

 [Qwen: Qwen3.5 397B A17B

Closed Source Model](https://modelslab.com/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)

[G3](https://modelslab.com/models/together_ai/google-gemma-3n-E4B-it)[Together AI](https://modelslab.com/models/together_ai)

 [Gemma 3N E4B Instruct

Closed Source Model](https://modelslab.com/models/together_ai/google-gemma-3n-E4B-it)

About LiquidAI: LFM2-24B-A2B
---

LFM2-24B-A2B is the largest model in the LFM2 family of hybrid architectures designed for efficient on-device deployment. Built as a 24B parameter Mixture-of-Experts model with only 2B active parameters per...

### Technical Specifications

Model IDliquid-lfm-2-24b-a2bCategoryLLM ModelsTaskText GenerationPrice$0.075000 per million tokensAddedFebruary 26, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate LiquidAI: LFM2-24B-A2B into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "liquid-lfm-2-24b-a2b",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab.com/models/liquid/liquid-lfm-2-24b-a2b/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

LiquidAI: LFM2-24B-A2B API costs $0.075000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Learn more about LiquidAI: LFM2-24B-A2B](https://modelslab.com/liquidai-lfm2-24b-a2b) [Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Liquid](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

LiquidAI: LFM2-24B-A2B FAQ
---

### What is LiquidAI: LFM2-24B-A2B?

LFM2-24B-A2B is the largest model in the LFM2 family of hybrid architectures designed for efficient on-device deployment. Built as a 24B parameter Mixture-of-Experts model with only 2B active parameters per...

### How do I use the LiquidAI: LFM2-24B-A2B API?

You can integrate LiquidAI: LFM2-24B-A2B into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "liquid-lfm-2-24b-a2b" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does LiquidAI: LFM2-24B-A2B cost?

LiquidAI: LFM2-24B-A2B costs $0.075000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the LiquidAI: LFM2-24B-A2B model ID?

The model ID for LiquidAI: LFM2-24B-A2B is "liquid-lfm-2-24b-a2b". Use this ID in your API requests to specify this model.

### Does LiquidAI: LFM2-24B-A2B have a free tier?

Yes, ModelsLab offers a free tier that lets you try LiquidAI: LFM2-24B-A2B and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-04-15*