---
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-04-15T00:19:10.821750Z
---

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)

[NN](https://modelslab.com/models/together_ai/nvidia-NVIDIA-Nemotron-3-Nano-30B-A3B-BF16)[Together AI](https://modelslab.com/models/together_ai)

 [Nvidia Nemotron 3 Nano 30B A3b Bf16

Closed Source Model](https://modelslab.com/models/together_ai/nvidia-NVIDIA-Nemotron-3-Nano-30B-A3B-BF16)

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

 [Qwen: Qwen3.5-122B-A10B

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

[ML](https://modelslab.com/models/open_router/mistralai-mistral-large)[Open Router](https://modelslab.com/models/open_router)

 [Mistral Large

Closed Source Model](https://modelslab.com/models/open_router/mistralai-mistral-large)

[MM](https://modelslab.com/models/open_router/mistralai-mistral-small-3.1-24b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Mistral Small 3.1 24B

Closed Source Model](https://modelslab.com/models/open_router/mistralai-mistral-small-3.1-24b-instruct)

[![GPT-5](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/a05bf5f0-fe1a-4815-b135-3325beef2516.webp)](https://modelslab.com/models/openai/gpt-5)[Open Ai](https://modelslab.com/models/openai)

 [GPT-5

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

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

 [Llama 4 Scout Instruct (17Bx16E)

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

[MM](https://modelslab.com/models/open_router/mistralai-mistral-medium-3.1)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Mistral Medium 3.1

Closed Source Model](https://modelslab.com/models/open_router/mistralai-mistral-medium-3.1)

[QV](https://modelslab.com/models/together_ai/Qwen-Qwen3-VL-235B-A22B-Instruct-FP8)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3-VL-235B-A22B-Instruct-FP8

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen3-VL-235B-A22B-Instruct-FP8)

[R1](https://modelslab.com/models/perplexity_ai/perplexity-ai-r1-1776)[ModelsLab](https://modelslab.com/models/perplexity_ai)

 [R1 1776

Closed Source Model](https://modelslab.com/models/perplexity_ai/perplexity-ai-r1-1776)

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

 [Meta: Llama 3.2 3B Instruct

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

[QQ](https://modelslab.com/models/open_router/qwen-qwen-vl-max)[Open Router](https://modelslab.com/models/open_router)

 [Qwen: Qwen VL Max

Closed Source Model](https://modelslab.com/models/open_router/qwen-qwen-vl-max)

[KK](https://modelslab.com/models/together_ai/moonshotai-Kimi-K2.5)[Together AI](https://modelslab.com/models/together_ai)

 [Kimi K2.5

Closed Source Model](https://modelslab.com/models/together_ai/moonshotai-Kimi-K2.5)

[OO](https://modelslab.com/models/open_router/openai-o4-mini)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: o4 Mini

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

[MM](https://modelslab.com/models/open_router/mistralai-mixtral-8x22b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Mixtral 8x22B Instruct

Closed Source Model](https://modelslab.com/models/open_router/mistralai-mixtral-8x22b-instruct)

[OG](https://modelslab.com/models/open_router/openai-gpt-4o-2024-05-13)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: GPT-4o (2024-05-13)

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-4o-2024-05-13)

[Q7](https://modelslab.com/models/qwen/Qwen-Qwen2.5-7B-Instruct-Turbo)[ModelsLab](https://modelslab.com/models/qwen)

 [Qwen2.5 7B Instruct Turbo

Closed Source Model](https://modelslab.com/models/qwen/Qwen-Qwen2.5-7B-Instruct-Turbo)

[M(](https://modelslab.com/models/mistral_ai/mistralai-Mistral-7B-Instruct-v0.3)[ModelsLab](https://modelslab.com/models/mistral_ai)

 [Mistral (7B) Instruct v0.3

Closed Source Model](https://modelslab.com/models/mistral_ai/mistralai-Mistral-7B-Instruct-v0.3)

[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)

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-04-15*