import requests r = requests.post( "https://api.aimlapi.com/v1/chat/completions", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "upstage/solar-mini4", "messages": [ { "role": "user", "content": "Hello!" } ] }, ) print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", { method: "POST", headers: { Authorization: `Bearer ${process.env.AIMLAPI_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "model": "upstage/solar-mini4", "messages": [ { "role": "user", "content": "Hello!" } ] }), }); console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \ -H "Authorization: Bearer $AIMLAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"upstage/solar-mini4","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Input | |
| Output | |
| Cached input |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Solar Mini 4 This page | Agentic workflows on a budget | |||
| Agentic workflows, coding & document analysis | ||||
| Reasoning + agents | ||||
| Fast, high-volume tasks |
Solar Mini 4 is Upstage's compact language model: a 35-billion-parameter mixture-of-experts with 3 billion active parameters and a 524,288-token context window. It is built for agentic use cases where cost per step matters.
On AI/ML API, Solar Mini 4 costs $0.13754 per 1M input tokens and $0.55016 per 1M output tokens. Cached input is billed at $0.013754 per 1M tokens.
Solar Mini 4 accepts up to 524,288 tokens in a single request and can return up to 131,072 tokens, so long documents and large codebases fit without chunking.
It is a text-in, text-out model with reasoning, streaming, structured outputs, tool calling and parallel tool calls — the pieces an agent loop needs to plan, call tools and verify its own work.
Send a POST request to https://api.aimlapi.com/v1/chat/completions with upstage/solar-mini4 as the model id and your AI/ML API key in the Authorization header. The endpoint is OpenAI-compatible, so existing chat completion clients work unchanged.