# Chat completion
Source: https://platform.monica.im/docs/en/chat/chat
POST /v1/chat/completions
Monica API Platform provides an OpenAI-compatible completion API to multiple models & providers that you can call directly or using the [OpenAI SDK](https://platform.openai.com/docs/libraries).
See [models and pricing](/docs/en/models-and-pricing) for all available models and pricing.
For more information about the request and response format, please refer to the [OpenAI documentation](https://platform.openai.com/docs/api-reference/completions).
## Using the API
```typescript Typescript theme={"system"}
import OpenAI from "openai"
const openai = new OpenAI({
baseURL: "https://openapi.monica.im/v1",
apiKey: $YOUR_API_KEY,
})
async function main() {
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages: [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain this image"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
]
})
console.log(completion.choices[0].message)
}
main()
```
```python Python theme={"system"}
from openai import OpenAI
client = OpenAI(
base_url="https://openapi.monica.im/v1",
api_key="$YOUR_API_KEY",
)
completion = client.chat.completions.create(
model="gpt-4o",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain this image"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
]
)
print(completion.choices[0].message.content)
```
```shell cURL theme={"system"}
curl https://openapi.monica.im/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain this image"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
]
}'
```
```typescript Typescript theme={"system"}
fetch("https://openapi.monica.im/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain this image"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
]
})
});
```
```python Python theme={"system"}
import requests
response = requests.post(
"https://openapi.monica.im/v1/chat/completions",
headers={
"Authorization": f"Bearer {YOUR_API_KEY}",
"Content-Type": "application/json"
},
json={
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain this image"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
]
}
)
print(response.json())
```
## See also
# Anthropic models
Source: https://platform.monica.im/docs/en/chat/models/anthropic
Claude is a family of state-of-the-art large language models developed by [Anthropic](https://anthropic.com).
## Using the API
Use [Chat completion](/docs/en/chat/chat) API to call Claude models. See the [pricing page](/docs/en/models-and-pricing#anthropic-models) for pricing details.
## Claude models comparison from Anthropic
| Feature | Claude Opus 4.6 | Claude Sonnet 4.6 | Claude Haiku 4.5 | Claude 4 Sonnet | Claude 4 Opus | Claude 3.7 Sonnet | Claude 3.5 Sonnet | Claude 3.5 Haiku |
| -------------------------- | ------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| Description | Anthropic's latest flagship model | High-performance flagship for real-time applications | Next-generation fast-response model | Most advanced Claude model | Highly capable for complex tasks | Enhanced Claude 3.5 Sonnet | Versatile and intelligent | Fast and efficient |
| Strengths | Agentic planning, coding, complex reasoning | Multimodal understanding, fast reasoning, cost-effectiveness | Lightning-fast inference, high performance | Top-level intelligence and reasoning | Exceptional fluency and understanding | Improved performance and efficiency | Balanced performance | Quick and accurate |
| Multilingual | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Vision | Yes | Yes | Yes | Yes | Yes | No | No | No |
| Tool calls | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| API model
name | `claude-opus-4-6` | `claude-sonnet-4-6` | `claude-haiku-4-5` | `claude-sonnet-4-20250514`
`claude-sonnet-4-20250514-thinking` | `claude-opus-4-20250514`
`claude-opus-4-20250514-thinking` | `claude-3-7-sonnet-latest`
`claude-3-7-sonnet-20250219` | `claude-3-5-sonnet-20241022`
`claude-3-5-sonnet-20240620`
`claude-3-5-sonnet-latest` | `claude-3-5-haiku-20241022`
`claude-3-5-haiku-latest` |
| Comparative
latency | Fast | Fast | Fastest | Fastest | Fast | Fast | Moderately fast | Fastest |
| Context
window | 1M | 1M | 200K | 200K | 200K | 200K | 200K | 200K |
| Max output | 128K tokens | 128K tokens | 64K tokens | 8192 tokens | 4096 tokens | 8192 tokens | 8192 tokens | 8192 tokens |
| Training data
cut-off | Aug 2025 | Aug 2025 | Jul 2025 | May 2025 | May 2025 | June 2024 | June 2024 | June 2024 |
## Official documentations
* [Claude 4 Sonnet](https://docs.anthropic.com/claude/docs/claude-4-sonnet)
* [Claude 4 Opus](https://docs.anthropic.com/claude/docs/claude-4-opus)
* [Claude 3.7 Sonnet](https://docs.anthropic.com/claude/docs/claude-3-7-sonnet)
* [Claude 3.5 Sonnet](https://docs.anthropic.com/claude/docs/claude-3-5-sonnet)
* [Claude 3.5 Haiku](https://docs.anthropic.com/claude/docs/claude-3-5-haiku)
# Google models
Source: https://platform.monica.im/docs/en/chat/models/google
[Gemini](https://ai.google.dev/gemini-api/docs) is Google's most capable AI model family, designed to be multimodal, efficient, and highly capable at a wide variety of tasks.
## Using the API
Use [Chat completion](/docs/en/chat/chat) API to call Gemini models. See the [pricing page](/docs/en/models-and-pricing#google-models) for pricing details.
## Gemini models comparison
| Feature | Gemini 3 Flash | Gemini 2.5 Pro Preview | Gemini 2.5 Flash | Gemini 2.5 Flash-Lite | Gemini 2.0 Flash | Gemini 1.5 Pro |
| ----------------- | ------------------------------------------------------------------------------ | ------------------------------------------ | ---------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| Description | Next-generation fast-response model for low-latency, high-throughput use cases | Most advanced Gemini model | Versatile and fast | Lightweight and efficient | Cost-effective for simple tasks | Previous generation advanced model |
| Best for | High-throughput applications and real-time interactions | Complex tasks requiring deep understanding | High-throughput applications | Quick responses and efficient processing | Budget-friendly tasks | Complex reasoning and analysis |
| Vision capability | Yes | Yes | No | No | No | Yes |
| Context window | 1.05M tokens | 1M tokens | 1M tokens | 1M tokens | 1M tokens | 1M tokens |
| API model key | `gemini-3-flash-preview` | `gemini-2.5-pro` | `gemini-2.5-flash` | `gemini-2.5-flash-lite` | `gemini-2.0-flash-001`
`gemini-2.0-flash-thinking-exp-01-21`
`gemini-2.0-flash-exp` | `gemini-1.5-pro-preview-0409`
`gemini-1.5-pro` |
## Important notes
### Long context handling
* All models support up to 1M tokens context window
* Different pricing tiers apply based on input length:
* Standard rate for inputs less than 128k tokens
* Higher rate for inputs more than 128k tokens
* Please check the [pricing page](/docs/en/models-and-pricing#google-models) for detailed pricing information
### Vision capabilities
* Gemini 2.5 Pro Preview and Gemini 1.5 Pro support multimodal inputs including images
* Can analyze complex visual information and provide detailed descriptions
* Vision support is not available in Flash or Flash-Lite models
### Model strengths
* **Gemini 3 Flash**:
* Next-generation fast-response model
* Designed for low-latency, high-throughput use cases
* Reliable performance for real-time interactions
* Supports vision input
* **Gemini 2.5 Pro Preview**:
* Advanced reasoning and analysis
* Multimodal understanding
* Complex task handling
* Code generation and analysis
* **Gemini 2.5 Flash**:
* Fast response times
* Cost-effective for simple tasks
* Efficient token usage
* Good for high-throughput applications
* **Gemini 2.5 Flash-Lite**:
* Lightweight and efficient
* Ideal for quick responses
* Budget-friendly for simple tasks
* **Gemini 2.0 Flash**:
* Cost-effective for basic tasks
* Reliable for lightweight applications
* Efficient token usage
* **Gemini 1.5 Pro**:
* Previous generation advanced model
* Multimodal capabilities
* Complex reasoning and analysis
## Official documentation
* [Gemini API Overview](https://ai.google.dev/docs/gemini_api_overview)
* [Vision Guide](https://ai.google.dev/docs/multimodal_concepts)
* [Safety & Responsible AI](https://ai.google.dev/docs/safety_guidance)
# OpenAI models
Source: https://platform.monica.im/docs/en/chat/models/openai
OpenAI models are a series of powerful language models developed by [OpenAI](https://openai.com).
## Using the API
Use [Chat completion](/docs/en/chat/chat) API to call OpenAI models. See the [pricing page](/docs/en/models-and-pricing#openai-models) for pricing details.
## OpenAI models comparison
| Feature | GPT-5.3 Codex | GPT-5 | GPT-4.1 | GPT-4.1-mini | GPT-4.1-nano | GPT-4o | GPT-4o-mini | o4-mini |
| ----------------- | ------------------------------------------------- | ---------------------------------------------- | ------------------ | ------------------------------- | ------------------------- | ------------------------------------ | ------------------------------- | --------------------- |
| API model key | `gpt-5.3-codex` | `gpt-5` | `gpt-4.1` | `gpt-4.1-mini` | `gpt-4.1-nano` | `gpt-4o` | `gpt-4o-mini` | `o4-mini` |
| Description | OpenAI's most capable coding model | Latest GPT-5 model | Mainstream GPT-4.1 | Lightweight GPT-4.1 | Ultra-light GPT-4.1 | Latest GPT-4o model | Lightweight GPT-4o | Cost-effective GPT-o |
| Current version | `gpt-5.3-codex` | `gpt-5` | `gpt-4.1` | `gpt-4.1-mini-2024-07-18` | `gpt-4.1-nano-2024-07-18` | `gpt-4o-2024-11-20` | `gpt-4o-mini-2024-07-18` | `o4-mini` |
| Best for | Coding tasks across the full development workflow | Advanced reasoning and complex problem-solving | General reasoning | Efficient general-purpose tasks | Fast, low-cost tasks | Complex reasoning and creative tasks | Efficient general-purpose tasks | Budget-friendly tasks |
| Vision capability | Yes | Yes (Enhanced) | No | No | No | Yes | Yes (see note) | No |
| Tool calls | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Context window | 400K tokens | 400K tokens | 128K tokens | 128K tokens | 128K tokens | 128K tokens | 128K tokens | 128K tokens |
| Max output | 128K tokens | 32K tokens | 8K tokens | 8K tokens | 8K tokens | 16K tokens | 16K tokens | 8K tokens |
| Knowledge cutoff | Aug 2025 | Jun 2024 | Oct 2023 | Oct 2023 | Oct 2023 | Oct 2023 | Oct 2023 | Oct 2023 |
## Important notes
### Vision capability
* Both GPT-4o and GPT-4o-mini support vision capabilities, allowing them to process and analyze images
* **⚠️ Known issue with GPT-4o-mini**: There are tokenization issues when processing images with GPT-4o-mini that may result in unexpectedly high input token counts. For vision tasks at this price point, we recommend using Claude 3 Haiku instead.
## Model versions and aliases
### GPT-5.3 Codex
* `gpt-5.3-codex` - OpenAI's most capable coding model, covering the full development workflow from writing to debugging and deployment
### GPT-4.1
* `gpt-4.1` - Mainstream GPT-4.1 model
* `gpt-4.1-mini` - Points to the current recommended version (currently gpt-4.1-mini-2024-07-18)
* `gpt-4.1-mini-2024-07-18` - Specific version
* `gpt-4.1-nano` - Points to the current recommended version (currently gpt-4.1-nano-2024-07-18)
* `gpt-4.1-nano-2024-07-18` - Specific version
### GPT-4o
* `gpt-4o` - Points to the current recommended version (currently gpt-4o-2024-11-20)
* `gpt-4o-2024-11-20` - Specific version
### GPT-4o-mini
* `gpt-4o-mini` - Points to the current recommended version (currently gpt-4o-mini-2024-07-18)
* `gpt-4o-mini-2024-07-18` - Specific version
### o4-mini & o4 series models
* `o4-mini` - Cost-effective GPT-o model
* o4 series models (such as o4-mini) include reasoning steps in their responses. This means they may generate more detailed explanations and therefore consume more output tokens than other models. Please consider this when planning your token budget.
## Official documentation
* [Vision Guide](https://platform.openai.com/docs/guides/vision) - Learn more about using vision capabilities
# Open Source models
Source: https://platform.monica.im/docs/en/chat/models/opensource
This page lists the major open source models available via API, including Meta Llama, NVIDIA, and Mistral.
## Open Source Models Comparison
| Model key | Model name | API model key | Input price (USD/1K tokens) | Output price (USD/1K tokens) |
| ------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------- | --------------------------- | ---------------------------- |
| `meta-llama/llama-3-8b-instruct` | Meta: Llama 3 8B Instruct | `meta-llama/llama-3-8b-instruct` | 0.28 | 0.83 |
| `meta-llama/llama-3.1-8b-instruct` | Meta: Llama 3.1 8B Instruct | `meta-llama/llama-3.1-8b-instruct` | 0.025 | 0.06 |
| `llama-3.3-70b-instruct` | Meta: Llama 3.3 70B Instruct | `llama-3.3-70b-instruct` | 0.13 | 0.4 |
| `nvidia/llama-3.1-nemotron-70b-instruct` | NVIDIA: Llama 3.1 Nemotron 70B | `nvidia/llama-3.1-nemotron-70b-instruct` | 1 | 1 |
| `meta-llama/llama-3-70b-instruct` | Meta: Llama 3 70B Instruct | `meta-llama/llama-3-70b-instruct` | 0.88 | 0.88 |
| `meta-llama/llama-3.1-405b-instruct`
`llama-3.1-405b-instruct` | Meta: Llama 3.1 405B Instruct | `meta-llama/llama-3.1-405b-instruct`
`llama-3.1-405b-instruct` | 4 | 4 |
| `mistralai/mistral-7b-instruct` | Mistral: Mistral 7B Instruct | `mistralai/mistral-7b-instruct` | 0.2 | 0.2 |
## Notes
* All models are accessible via the [Chat completion](/docs/en/chat/chat) API.
* For more details, see the [pricing page](/docs/en/models-and-pricing#open-source-models).
* Visit the official sites for each model for technical documentation and updates.
# xAI models
Source: https://platform.monica.im/docs/en/chat/models/xai
xAI (Grok) is a family of advanced large language models developed by [xAI](https://x.ai/), designed for high performance and efficiency.
## Using the API
Use the [Chat completion](/docs/en/chat/chat) API to call xAI models. See the [pricing page](/docs/en/models-and-pricing#xai-models) for details.
## xAI (Grok) models comparison
| Feature | Grok 3 Beta | Grok Beta |
| ----------------- | --------------------------------- | --------------------------------- |
| Description | Latest beta model | Stable model |
| Best for | Complex reasoning, creative tasks | General reasoning, analysis |
| Vision capability | No | No |
| Tool calls | No | No |
| Context window | 128K tokens | 128K tokens |
| Max output | 15K tokens | 15K tokens |
| Knowledge cutoff | Not disclosed | Not disclosed |
| API model key | `x-ai/grok-3-beta` | `x-ai/grok-beta`
`Grok-beta` |
## Notes
* Grok 3 Beta is the latest beta version, suitable for scenarios requiring the newest capabilities.
* Grok Beta is the stable version, recommended for production use.
* For more details, visit [xAI Grok](https://x.ai/)。
# Errors
Source: https://platform.monica.im/docs/en/errors
Explore API error codes and solutions.
This guide includes an overview on error codes you might see from the API. Each error code mentioned in the overview has a dedicated section with further guidance.
## API errors
| Code | Overview |
| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **401** - Invalid Authentication | **Cause:** Invalid Authentication
**Solution:** Ensure the correct API key are being used. |
| **401** - Incorrect API key provided | **Cause:** The requesting API key is not correct.
**Solution:** Ensure the API key used is correct, clear your browser cache, or generate a new one. |
| **429** - Rate limit reached for requests | **Cause:** You are sending requests too quickly.
**Solution:** Pace your requests. Check your rate limits. |
| **429** - You exceeded your current quota, please check your plan and billing details | **Cause:** You have run out of balance.
**Solution:** Buy more balance. |
| **500** - The server had an error while processing your request | **Cause:** Issue on our servers.
**Solution:** Retry your request after a brief wait and contact us if the issue persists. |
| **503** - The engine is currently overloaded, please try again later | **Cause:** Our servers are experiencing high traffic.
**Solution:** Please retry your requests after a brief wait. |
# Fraquently Asked Questions
Source: https://platform.monica.im/docs/en/faq
### I subscribed to Monica's Pro/Unlimited membership. Can I use Monica Open API for free?
Sorry, Monica's **subscription membership** and *Monica Open API operate* under separate systems designed for different use cases. You will still need to add funds to your Open API account to use the API.
### I can't link my payment method or add funds.
Please contact us if you encounter any payment issues, we will assist you promptly.
### What happens to my data when I use Monica Open API?
The data you send to us is protected by our Privacy Policy and will not be used for model training. We only store your data for security auditing purposes and delete it after 30 days.
Some data may be sent to trusted third parties (e.g., OpenAI) when you use Monica Open API. We carefully review third-party privacy policies to ensure your data is handled appropriately.
### Will my balance be deducted if an API call fails?
No, your balance will not be deducted if your API call fails. Only successful API calls will deduct from your balance.
### Where can I view my billing and usage records? How can I get an invoice?
You can view your billing details and download invoices on your Billing Page.
Your usage records are available on the Usage Page.
### Can I get a refund if I'm not satisfied after using the service?
Sorry, Monica Open API does not support refunds.
Our responses are generated by LLMs or other AI technologies, and there may be cases where the outcome doesn't meet your expectations. We recommend starting with a small amount of funds to test the service before making larger payments.
### How do you handle AI-generated content that is sexual, violent, or harmful?
Monica Open API does not support generating sexual, violent, or other inappropriate content. We also implement technical measures to prevent the generation of such content.
If you encounter any of such content that generated by our API, please contact us, and we will address the issue promptly.
# DALL·E models
Source: https://platform.monica.im/docs/en/image-gen/dalle
POST /v1/image/gen/dalle
DALL·E 3 is [OpenAI](https://openai.com)'s latest and most advanced text-to-image AI model.
* Produces highly detailed and photorealistic images
* Excellent at capturing complex scenes and concepts
* Superior understanding of spatial relationships and composition
See the [pricing page](/docs/en/models-and-pricing#image-generation) for pricing details.
**Resources**
* [Official Documentation](https://platform.openai.com/docs/guides/images)
**Previews**
# FLUX models
Source: https://platform.monica.im/docs/en/image-gen/flux
POST /v1/image/gen/flux
The FLUX series represents a family of AI image generation models developed by [Black Forest Labs](https://blackforestlabs.ai/). See the [pricing page](/docs/en/models-and-pricing#image-generation) for pricing details.
**FLUX.1 Schnell**
* Entry-level model in the FLUX series
* Optimized for speed and efficiency
* Balanced performance for general-purpose use
**FLUX.1 dev**
* Developer-focused variant
* Enhanced customization options
* Flexible parameter adjustments
**FLUX.1 pro**
* Professional-grade model
* Highest quality output in the series
* Advanced features and controls
**Previews**
# Ideogram models
Source: https://platform.monica.im/docs/en/image-gen/ideogram
POST /v1/image/gen/ideogram
Ideogram is an advanced AI image generation model developed by [Ideogram AI](https://ideogram.ai/). See the [pricing page](/docs/en/models-and-pricing#image-generation) for pricing details.
**Ideogram V2**
* Latest version of Ideogram's image generation technology
* Exceptional text rendering capabilities
* Superior handling of typography and logos
* Precise control over text placement and style
* Ideal for:
* Marketing materials
* Brand assets
* Social media content
* Designs requiring text integration
* Professional graphics with text elements
**Previews**
# Playground models
Source: https://platform.monica.im/docs/en/image-gen/playground
POST /v1/image/gen/playground
Playground is a series of image generation models developed by [Playground AI](https://playground.ai/). See the [pricing page](/docs/en/models-and-pricing#image-generation) for pricing details.
**Playground V2.5**
* Latest iteration of Playground's image generation technology
* Cost-effective solution for high-quality image generation
* Features:
* Strong artistic style interpretation
* Good composition and coherence
* Efficient processing speed
* Reliable output quality
* Best for:
* Creative projects
* Digital art creation
* Content generation
* Rapid prototyping
* Personal and commercial use
**Previews**
# Stable Diffusion models
Source: https://platform.monica.im/docs/en/image-gen/stable-diffusion
POST /v1/image/gen/sd
Stable Diffusion represents a series of open-source image generation models developed by [Stability AI](https://stability.ai/). See the [pricing page](/docs/en/models-and-pricing#image-generation) for pricing details.
**Stable Diffusion XL 1.0**
* Efficient image generation model
* Good quality and performance
* Suitable for general use
**Stable Diffusion 3**
* Advanced model with better prompting
* Higher image quality and details
* Ideal for professional work
**Stable Diffusion 3.5 Large**
* Latest model with best quality
* Exceptional detail and realism
* Superior artistic capabilities
**Previews**
# Remove background
Source: https://platform.monica.im/docs/en/image-tools/remove-bg
POST /v1/image/tool/removebg
The Remove Background API automatically detects the subject in an image and converts the background into transparent pixels.
This API is suitable for images with a clear distinction between the subject and the background.
See the [pricing page](/docs/en/models-and-pricing#image-tools) for pricing.
# Upscale
Source: https://platform.monica.im/docs/en/image-tools/upscale
POST /v1/image/tool/upscale
The Upscale API can enlarge input images by a specified scale, delivering results of higher quality compared to traditional upscaling methods.
This API supports input images up to `2048x2048` resolution and output images up to `4096x4096` resolution. When the input resolution exceeds 2048, the scale can only be `2`.
See the [pricing page](/docs/en/models-and-pricing#image-tools) for pricing.
# Models and pricing
Source: https://platform.monica.im/docs/en/models-and-pricing
## Chat
The chat models charge based on input and output tokens. Different models have different costs.
Token calculation rules vary by model. Please rely on the `usage` field in the response.
| Model Name | Model key | Pricing |
| ------------------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **GPT-5.3 Codex** | `gpt-5.3-codex` | **\$1.75** / 1M input tokens
**\$14.00** / 1M output tokens |
| **gpt-5** | `gpt-5` | **\$1.25** / 1M input tokens
**\$10.00** / 1M output tokens |
| **gpt-4.1** | `gpt-4.1` | **\$2.00** / 1M input tokens
**\$8.00** / 1M output tokens |
| **gpt-4.1-mini** | `gpt-4.1-mini` | **\$0.40** / 1M input tokens
**\$1.60** / 1M output tokens |
| **gpt-4.1-nano** | `gpt-4.1-nano` | **\$0.10** / 1M input tokens
**\$0.40** / 1M output tokens |
| **gpt-4o** | `gpt-4o`
`gpt-4o-2024-11-20` | **\$2.50** / 1M input tokens
**\$10.00** / 1M output tokens |
| **gpt-4o-mini** | `gpt-4o-mini`
`gpt-4o-mini-2024-07-18` | **\$0.15** / 1M input tokens
**\$0.60** / 1M output tokens |
| **o4-mini** | `o4-mini` | **\$0.55** / 1M input tokens
**\$2.20** / 1M output tokens |
| **o3** | `o3` | **\$2.00** / 1M input tokens
**\$8.00** / 1M output tokens |
| **Claude Opus 4.6** | `claude-opus-4-6` | **\$5.00** / 1M input tokens
**\$25.00** / 1M output tokens |
| **Claude Opus 4** | `claude-opus-4-20250514`
`claude-opus-4-20250514-thinking` | **\$15.00** / 1M input tokens
**\$75.00** / 1M output tokens |
| **Claude Sonnet 4.6** | `claude-sonnet-4-6` | **\$3.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **Claude Sonnet 4** | `claude-4-sonnet`
`claude-sonnet-4-20250514`
`claude-sonnet-4-20250514-thinking` | **\$3.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **Claude Sonnet 3.7** | `claude-3-7-sonnet-latest` | **\$3.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **Claude Sonnet 3.5 v2** | `claude-3-5-sonnet-20241022`
`claude-3-5-sonnet-latest` | **\$3.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **Claude Sonnet 3.5** | `claude-3-5-sonnet-20240620` | **\$3.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **Claude Haiku 4.5** | `claude-haiku-4-5` | **\$1.00** / 1M input tokens
**\$5.00** / 1M output tokens |
| **Claude Haiku 3.5** | `claude-3-5-haiku-latest`
`claude-3-5-haiku-20241022` | **\$0.80** / 1M input tokens
**\$4.00** / 1M output tokens |
| **Claude Opus 3** | `claude-3-opus-20240229` | **\$15.00** / 1M input tokens
**\$75.00** / 1M output tokens |
| **Claude Haiku 3** | `claude-3-haiku-20240307`
`claude-3-haiku` | **\$0.25** / 1M input tokens
**\$1.25** / 1M output tokens |
| **Gemini 3 Flash** | `gemini-3-flash-preview` | **\$0.50** / 1M input tokens
**\$3.00** / 1M output tokens |
| **Gemini 2.5 Pro** | `gemini-2.5-pro` | **\$1.25** / 1M input tokens
**\$10.00** / 1M output tokens |
| **Gemini 2.5 Flash-Lite** | `gemini-2.5-flash-lite` | **\$0.10** / 1M input tokens
**\$0.40** / 1M output tokens |
| **Gemini 2.5 Flash** | `gemini-2.5-flash` | **\$0.30** / 1M input tokens
**\$2.50** / 1M output tokens |
| **Gemini 2.0 Flash** | `gemini-2.0-flash-001`
`gemini-2.0-flash-thinking-exp-01-21`
`gemini-2.0-flash-exp` | **\$0.10** / 1M input tokens
**\$0.40** / 1M output tokens |
| **Gemini 1.5 Pro** | `gemini-1.5-pro-002`
`gemini-1.5-pro-preview-0409`
`gemini-1.5-pro` | **\$1.25** / 1M input tokens
**\$5.00** / 1M output tokens |
| **Gemini 1.5 Flash** | `gemini-1.5-flash`
`gemini-1.5-flash-002`
`gemini-1.5-flash-001` | **\$0.075** / 1M input tokens
**\$0.30** / 1M output tokens |
| **xAI: Grok 3 Beta** | `x-ai/grok-3-beta` | **\$3.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **xAI: Grok Beta** | `x-ai/grok-beta` | **\$5.00** / 1M input tokens
**\$15.00** / 1M output tokens |
| **Meta: Llama 3 8B Instruct** | `meta-llama/llama-3-8b-instruct` | **\$0.28** / 1M input tokens
**\$0.83** / 1M output tokens |
| **Meta: Llama 3.1 8B Instruct** | `meta-llama/llama-3.1-8b-instruct` | **\$0.025** / 1M input tokens
**\$0.06** / 1M output tokens |
| **Meta: Llama 3.3 70B Instruct** | `llama-3.3-70b-instruct` | **\$0.13** / 1M input tokens
**\$0.40** / 1M output tokens |
| **NVIDIA: Llama 3.1 Nemotron 70B Instruct** | `nvidia/llama-3.1-nemotron-70b-instruct` | **\$1.00** / 1M input tokens
**\$1.00** / 1M output tokens |
| **Meta: Llama 3 70B Instruct** | `meta-llama/llama-3-70b-instruct` | **\$0.88** / 1M input tokens
**\$0.88** / 1M output tokens |
| **Meta: Llama 3.1 405B Instruct** | `meta-llama/llama-3.1-405b-instruct`
`llama-3.1-405b-instruct` | **\$4.00** / 1M input tokens
**\$4.00** / 1M output tokens |
| **Mistral: Mistral 7B Instruct** | `mistralai/mistral-7b-instruct` | **\$0.20** / 1M input tokens
**\$0.20** / 1M output tokens |
## Image generation
Different image generation models have varying pricing methods. See the table below for details:
| Model | Pricing |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Stable Diffusion XL 1.0** | **\$0.005** / image |
| **Stable Diffusion 3 Large** | **\$0.035** / image |
| **Stable Diffusion 3.5 Large** | **\$0.065** / image |
| **Flux Schnell 1.0** | **\$0.003** / image |
| **Flux Dev 1.0** | **\$0.025** / image |
| **Flux Pro 1.0** | **\$0.055** / image |
| **DALL·E 3** | **\$0.040** / image (Standard, 1024×1024)
**\$0.080** / image (Standard, 1024×1792, 1792×1024)
**\$0.080** / image (HD, 1024×1792)
**\$0.120** / image (HD, 1024×1792, 1792×1024) |
| **Playground V2.5** | **\$0.0039** / image |
| **Ideogram V2** | **\$0.08** / image |
## Image tools
| API | Pricing |
| ------------------------- | ------------------- |
| `/v1/image/upscale` | **\$0.004** / image |
| `/v1/image/remove-object` | **\$0.004** / image |
# Monica API Platform Documentation
Source: https://platform.monica.im/docs/en/overview
**Monica API Platform** (also known as **Monica Open API**) is a unified API platform that integrates AI APIs for chat, image generation, image processing and more.
Looking to chat with Monica? Visit [monica.im](https://monica.im)!
## Get Started
Learn the essentials and make your first API call in minutes.
## Can't find the API you need?
Tell us what you need and we'll get back to you.
## Support
# Quickstart
Source: https://platform.monica.im/docs/en/quickstart
Start building AI applications with Monica Open API in 5 minutes.
## Make your first API call
Follow these simple steps to make your first API call with Monica Open API.
Click here to sign up for your Monica account.
Link a payment method and add funds to your account through your billing page.
A positive balance is required to use the API.
If you encountered any payment issues, please contact us.
Visit the API keys page to create your first API key.
Keep this key secure as it will be used to authenticate your API requests.
Start integrating Monica's API using your generated API key.
Here's an example request:
Replace `$YOUR_API_KEY` with the actual API key you generated in the previous step.
```shell theme={"system"}
curl https://openapi.monica.im/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Hi!"
}
]
}
]
}'
```
## What's next?
Explore available API endpoints and their functionalities:
* [Chat](/docs/en/chat/chat)
* [Image generations](/docs/en/image-generation/flux)
* [Image tools](/docs/en/image-tools/upscale)
More info about the API:
* [Pricing](/docs/en/models-and-pricing)
* [Rate Limits](/docs/en/rate-limits)
* [Errors](/docs/en/errors)
## Need help?
# Rate limits
Source: https://platform.monica.im/docs/en/rate-limits
Most APIs in Monica API Platform have rate limits, and this document lists the default rate limits for all endpoints.
If these limits are too low for your needs, please contact us to request a higher limit.
You can check your actual rate limits anytime on
the limits page
in the dashboard.
## Chat
| Model | RPM | TPM |
| --------------------------- | --- | --------- |
| **GPT-5.3 Codex** | 100 | 100,000 |
| **gpt-4o** | 100 | 100,000 |
| **gpt-4o-mini** | 500 | 2,000,000 |
| **o1-preview** | 10 | 30,000 |
| **o1-mini** | 50 | 300,000 |
| **Claude Opus 4.6** | 100 | 100,000 |
| **Claude Sonnet 4.6** | 100 | 100,000 |
| **Claude Haiku 4.5** | 500 | 2,000,000 |
| **Claude 3.5 Sonnet** | 100 | 100,000 |
| **Claude 3.5 Haiku** | 100 | 100,000 |
| **Claude 3 Opus** | 100 | 100,000 |
| **Claude 3 Haiku** | 500 | 2,000,000 |
| **Gemini 3 Flash** | 500 | 2,000,000 |
| **Gemini 1.5 Pro 002** | 100 | 100,000 |
| **Gemini 1.5 Flash 002** | 500 | 2,000,000 |
| **Grok Beta** | 50 | 300,000 |
| **Llama 3.1 405B Instruct** | 50 | 300,000 |
| **Llama 3.3 70B Instruct** | 50 | 300,000 |
| **other model** | 100 | 100,000 |
## Image generations
| Model | RPM | Concurrent Requests |
| ------------------------------ | --- | ------------------- |
| **Stable Diffusion XL 1.0** | 10 | 8 |
| **Stable Diffusion 3 Large** | 10 | 8 |
| **Stable Diffusion 3.5 Large** | 10 | 8 |
| **Flux Schnell 1.0** | 10 | 8 |
| **Flux Dev 1.0** | 10 | 8 |
| **Flux Pro 1.0** | 10 | 8 |
| **DALL·E 3** | 10 | 8 |
| **Playground V2.5** | 10 | 8 |
| **Ideogram V2** | 10 | 8 |
## Image tools
| API | RPM | Concurrent Requests |
| ----------------- | --- | ------------------- |
| **Upscale** | 10 | 8 |
| **Remove Object** | 10 | 8 |