All models

OpenAI

gpt-4o-mini

GPT-4o mini is OpenAI's newest model after [GPT-4 Omni](/models/openai/gpt-4o), supporting both text and image inputs with text outputs. As their most advanced small model, it is many multiples more affordable...

textAPI availablestreamingfunction tools
gpt-4o-miniVersion date 2024-07-18

Tokely price / 1M tokens

$0.286767input
$0.143384cached input
$1.147068output

USD · Published rate · Updated 2026-10-06

OpenRouter reference$0.15 input · $0.6 output / 1M tokensStandard listed rates · 2026-10-06

Context window

128,000tokens · model specification

Model max output

16,384tokens

First request

Available
curl https://tokely.me/v1/chat/completions \
  -H "Authorization: Bearer $TOKELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 256
  }'

Set TOKELY_API_KEY to your dashboard key. Requests require a funded Tokely balance. Base URL: https://tokely.me/v1.

Compare nearby prices

USD per million tokens. Compare price and context; these are not quality benchmarks.
ModelInputOutputContext
gpt-4o-miniOpenAI · this model$0.286767$1.147068128,000
gpt-4o-mini-2024-07-18OpenAI$0.275738$1.10295128,000
glm-5.3-flashChatGLM$0.28125$0.93751,048,576
qwen3.8-flashQwen$0.4125$1.29251,000,000
gemini-2.5-flash-liteGoogle$0.238973$0.955891,048,576

Capabilities & limits

Provider
OpenAI
API model ID
gpt-4o-mini
Category
Text
Endpoints
POST /v1/chat/completions
Tokely max output
16,384 tokens / request, including reasoning tokens
Default output
256 tokens. Set an explicit limit for longer responses.
Request limits
256 KB JSON body · 128 messages · 32 function tools
Rate limit
60 requests / minute / account, across its keys
Supported input
Text messages and function tool results
Model modalities
text, image, file. Tokely currently accepts text input.

The context includes your instructions, conversation history, tool definitions and generated output. Keep the input and requested output within the model’s context window.

OpenRouter model reference

API reference

Authenticate with Authorization: Bearer YOUR_TOKELY_API_KEY. Use an OpenAI SDK with the Tokely base URL.

model
Required string: gpt-4o-mini
messages
An array of system, developer, user, assistant and tool messages.
max_tokens
Optional integer, 1–16,384. Defaults to 256.
stream
Set true for Server-Sent Events (SSE).
tools
Function definitions executed by your application. Provider-hosted tools are not enabled.

The response contains choices with message or tool_calls, finish_reason, and usage (prompt_tokens, completion_tokens, total_tokens). Streaming sends chat completion chunks.

400 / 415
Invalid request, parameter, endpoint for this model, or content type.
401 / 403
Invalid, revoked or restricted API key.
402
Insufficient account balance or API key budget.
429
Request limit reached. Retry after the indicated delay.
502 / 503 / 504
Upstream failure, temporary service unavailability or request timeout.

Frequently asked questions

How much does gpt-4o-mini cost?

$0.286767 per million input tokens, $1.147068 per million output tokens and $0.143384 per million cached input tokens. Usage is charged to your Tokely balance.

Do I need a separate OpenAI account?

Use your Tokely API key and balance. A separate provider key is not required.

How do I switch to this model?

Set model to gpt-4o-mini and use /v1/chat/completions. Keep your Tokely base URL and API key.

What is the context window?

128,000 tokens, including input and output. The Tokely request body and output limits listed above also apply.

Related versions