Back to models
MiniCPM4-8B
OpenBMB's ultra-efficient 8B language model engineered for edge and single-GPU deployment, supporting up to 128K long-context processing, fast sparse-attention inference, tool use, and structured generation.
What you can do
- 128K long-document analysis
- MCP & agent tool-call workflows
- On-premise single-GPU coding assistant
Input & output
- Input
- Text prompts, code context, or long documents up to 128K tokens
- Output
- Assistant text, structured tool calls, long-document summaries, or code
Try a prompt like this
Read this 60-page technical specification and generate a structured MCP tool schema along with Python client validation code.
Things to know
Apache-2.0 open weights (~16GB VRAM in BF16 or ~5GB in INT4); requires `trust_remote_code=True` or updated vLLM/SGLang kernels to unlock full sparse-attention speedups.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
OpenBMB/MiniCPM4-8B
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="OpenBMB/MiniCPM4-8B",
messages=[{"role": "user", "content": "Read this 60-page technical specification and generate a structured MCP tool schema along with Python client validation code."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide