Skip to main content
Core.Today
|
OpenAIFastHigh

GPT-4.1 Mini

A significant leap in small model performance. Matches or exceeds GPT-4o in intelligence while reducing latency by nearly half and cost by 83%. Ideal balance of speed, quality, and affordability.

1 credits
per 1K tokens (avg)
1M token context window
32K max output tokens
Matches GPT-4o intelligence at fraction of cost
~50% lower latency than GPT-4o
Native vision (text + image)
Function calling & JSON mode

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

llms.txt

Model Specifications

Context Window
1.0M
tokens
Max Output
33K
tokens
Training Cutoff
2024-05
Compatible SDK
OpenAI

Capabilities

Vision
Function Calling
Streaming
JSON Mode
System Prompt

Token Pricing (per 1M tokens)

Token TypeCreditsUSD Equivalent
Input Tokens400$0.40
Output Tokens1,600$1.60
Cached Tokens100$0.10

* 1 credit โ‰ˆ $0.001 (actual charges may vary based on usage)

Quick Start

curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "gpt-4.1-mini",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant. Be concise."
    },
    {
      "role": "user",
      "content": "What are the top 3 design patterns for microservices?"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1000
}'

Parameters

ParameterTypeRequiredDefaultDescription
messagesarrayYes-Array of message objects with role and content
modelstringYesgpt-4.1-miniModel identifier
temperaturefloatNo1.0Sampling temperature (0-2). Lower = more focused, higher = more creative
max_tokensintegerNo4096Maximum tokens in response (up to 32768)
streambooleanNofalseEnable Server-Sent Events streaming
response_formatobjectNo-Format of response: { type: 'json_object' } for JSON mode
toolsarrayNo-List of tools (functions) the model can call
top_pfloatNo1.0Nucleus sampling threshold (0-1)

Examples

Quick Chat

Fast, cost-effective conversation

curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "gpt-4.1-mini",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant. Be concise."
    },
    {
      "role": "user",
      "content": "What are the top 3 design patterns for microservices?"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1000
}'

Data Classification

Classify and tag content at scale

curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer cdt_your_api_key" \
  -d '{
  "model": "gpt-4.1-mini",
  "messages": [
    {
      "role": "system",
      "content": "Classify the given text into categories. Respond with JSON."
    },
    {
      "role": "user",
      "content": "Classify this support ticket: 'My payment was charged twice and I need a refund for the duplicate charge'"
    }
  ],
  "response_format": {
    "type": "json_object"
  },
  "max_tokens": 200
}'

Tips & Best Practices

1Best value model โ€” GPT-4o intelligence at 83% lower cost
2Ideal for high-volume production workloads
3Nearly half the latency of GPT-4o โ€” great for real-time apps
4Use for tasks where GPT-4o feels too expensive
5Supports same 1M context window as GPT-4.1
6Streaming reduces time-to-first-token significantly

Use Cases

Cost-effective production deployments
Real-time chatbots and assistants
High-volume data processing
Code completion and suggestions
Content classification and tagging
Quick document analysis

Model Info

ProviderOpenAI
Version2025-04-14
CategoryLLM
Price1 credits

API Endpoint

POST /llm/openai/v1/chat/completions
Try in PlaygroundBack to Docs