Solar Mini 4 API

upstage/solar-mini4
Solar Mini 4 is Upstage's compact, cost-efficient model: a 35B-parameter mixture-of-experts with 3B active parameters and a 524,288-token context window, built for agentic use cases.
Context
512K tokens
Input
$0.13754 / 1M tokens
Output
$0.55016 / 1M tokens
Released
Sep 22, 2026

How to use Solar Mini 4 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to upstage/solar-mini4.
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.

Solar Mini 4 API Pricing

TypePrice
Input
$0.13754 / 1M tokens
Output
$0.55016 / 1M tokens
Cached input
$0.013754 / 1M tokens

Solar Mini 4 vs other models

ModelInputOutputContextBest for
Solar Mini 4
This page
$0.13754 / 1M tokens
$0.55016 / 1M tokens
512K tokens
Agentic workflows on a budget
$0.041262 / 1M tokens
$0.165048 / 1M tokens
512K tokens
Agentic workflows, coding & document analysis
$0.20631 / 1M tokens
$0.82524 / 1M tokens
128K tokens
Reasoning + agents
$0.13 / 1M tokens
$0.65 / 1M tokens
1.05M tokens
Fast, high-volume tasks

Frequently asked questions

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.

Start building with Solar Mini 4

Get API Key
1000+ models, one API.