---
title: LFM2 24B A2B API | Text Generation | ModelsLab
description: Build with LFM2 24B A2B API by LiquidAI. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab.com/models/together_ai/liquidai-lfm2-24b-a2b.md
canonical: https://modelslab.com/models/together_ai/liquidai-lfm2-24b-a2b.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-05T20:33:32.883635Z
---

LFM2-24B-A2B
---

 [LLMs.txt](https://modelslab.com/models/together_ai/LiquidAI-LFM2-24B-A2B/llms.txt) [.md](https://modelslab.com/models/LiquidAI/LiquidAI-LFM2-24B-A2B.md)

LiquidAI-LFM2-24B-A2B LiquidAI Closed Source Model $0.075000 / call

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

### LFM2-24B-A2B

LiquidAI LiquidAI-LFM2-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)

[Q8](https://modelslab.com/models/together_ai/Qwen-Qwen3-8B)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3 8B

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

[GG](https://modelslab.com/models/open_router/google-gemini-2.0-flash-001)[Open Router](https://modelslab.com/models/open_router)

 [Google: Gemini 2.0 Flash

Closed Source Model](https://modelslab.com/models/open_router/google-gemini-2.0-flash-001)

[![GPT 5.2](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/2bdd00f4-1692-49d8-a562-72cb1753d0ff.png)](https://modelslab.com/models/openai/gpt-5.2)[Open Ai](https://modelslab.com/models/openai)

 [GPT 5.2

Closed Source Model](https://modelslab.com/models/openai/gpt-5.2)

[![GPT 5.1](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/fad83520-47a8-4059-b4b9-b32adf4d0be7.png)](https://modelslab.com/models/openai/gpt5.1)[Open Ai](https://modelslab.com/models/openai)

 [GPT 5.1

Closed Source Model](https://modelslab.com/models/openai/gpt5.1)

[XM](https://modelslab.com/models/open_router/xiaomi-mimo-v2.5-pro)[Open Router](https://modelslab.com/models/open_router)

 [Xiaomi: MiMo-V2.5-Pro

Closed Source Model](https://modelslab.com/models/open_router/xiaomi-mimo-v2.5-pro)

[![GPT-5-mini](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/0bda788d-705d-4cbd-9c9d-dcdaa12b9493.webp)](https://modelslab.com/models/openai/gpt-5-mini)[Open Ai](https://modelslab.com/models/openai)

 [GPT-5-mini

Closed Source Model](https://modelslab.com/models/openai/gpt-5-mini)

[QQ](https://modelslab.com/models/open_router/qwen-qwen3.5-397b-a17b)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen3.5 397B A17B

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

[L4](https://modelslab.com/models/meta/meta-llama-Llama-4-Scout-17B-16E-Instruct)[ModelsLab](https://modelslab.com/models/meta)

 [Llama 4 Scout Instruct (17Bx16E)

Closed Source Model](https://modelslab.com/models/meta/meta-llama-Llama-4-Scout-17B-16E-Instruct)

[QV](https://modelslab.com/models/together_ai/Qwen-Qwen2-VL-72B-Instruct)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen2-VL (72B) Instruct

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen2-VL-72B-Instruct)

[GG](https://modelslab.com/models/open_router/google-gemma-3-27b-it)[Open Router](https://modelslab.com/models/open_router)

 [Google: Gemma 3 27B

Closed Source Model](https://modelslab.com/models/open_router/google-gemma-3-27b-it)

[AN](https://modelslab.com/models/open_router/amazon-nova-lite-v1)[Open Router](https://modelslab.com/models/open_router)

 [Amazon: Nova Lite 1.0

Closed Source Model](https://modelslab.com/models/open_router/amazon-nova-lite-v1)

[MK](https://modelslab.com/models/open_router/moonshotai-kimi-latest)[Open Router](https://modelslab.com/models/open_router)

 [MoonshotAI Kimi Latest

Closed Source Model](https://modelslab.com/models/open_router/moonshotai-kimi-latest)

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

 [Qwen3 14B Base

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

[Q1](https://modelslab.com/models/together_ai/Qwen-Qwen3.5-122B-A10B-FP8)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3.5 122B A10b Fp8

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen3.5-122B-A10B-FP8)

[SS](https://modelslab.com/models/open_router/stepfun-step-3.5-flash)[Open Router](https://modelslab.com/models/open_router)

 [StepFun: Step 3.5 Flash

Closed Source Model](https://modelslab.com/models/open_router/stepfun-step-3.5-flash)

[![Seed 1.8](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/4c050f2a-27fd-40d1-9b1e-7bfc9557709f.webp)](https://modelslab.com/models/byteplus/seed-1.8)[Bytedance](https://modelslab.com/models/byteplus)

 [Seed 1.8

Closed Source Model](https://modelslab.com/models/byteplus/seed-1.8)

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

 [OpenAI: GPT-5.1

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

[Q9](https://modelslab.com/models/together_ai/Qwen-Qwen3.5-9B)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3.5 9B FP8

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

About LFM2-24B-A2B
---

LFM2-24B-A2B is a text generation AI model by LiquidAI available on ModelsLab. Access LFM2-24B-A2B through our API with pay-per-use pricing and no minimum commitments.

### Technical Specifications

Model IDLiquidAI-LFM2-24B-A2BCategoryLLM ModelsTaskText GenerationPrice$0.075000 per million tokensAddedApril 4, 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 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": "LiquidAI-LFM2-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/LiquidAI/LiquidAI-LFM2-24B-A2B/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

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

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from LiquidAI](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

LFM2-24B-A2B FAQ
---

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

LFM2-24B-A2B is a text generation AI model by LiquidAI available on ModelsLab. Access it through our API with pay-per-use pricing and no minimum commitments.

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

You can integrate 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 "LiquidAI-LFM2-24B-A2B" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

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

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 LFM2-24B-A2B model ID?

The model ID for LFM2-24B-A2B is "LiquidAI-LFM2-24B-A2B". Use this ID in your API requests to specify this model.

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

Yes, ModelsLab offers a free tier that lets you try 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-05-06*