OpenAIGPT-4o Mini API
Small, cost-efficient GPT-4o tier for high-volume text tasks.
Params
Billed at this model’s published rate.
Result

Other models from OpenAI
Same vendor, same API call — the differences are below.
| Model | Use case | Price | Resolution | Duration | Added |
|---|---|---|---|---|---|
| GPT-6.1 Sol | Image → Text | from $0.10 / 1M cached in | — | — | Oct 2026 |
| GPT-6.1 Terra | Image → Text | from $0.05 / 1M cached in | — | — | Oct 2026 |
| GPT Image 2.6 Flare | Text → Image | from $40.00 / 1M output img tok | 1K · 2K · 4K | — | Oct 2026 |
| GPT Image 2.6 Sunburst | Text → Image | from $40.00 / 1M output img tok | 1K · 2K · 4K | — | Oct 2026 |
| GPT-6 Luna | Image → Text | from $0.011 / 1M cached in | — | — | Sep 2026 |
| GPT-6 Sol | Image → Text | from $0.22 / 1M cached in | — | — | Sep 2026 |
| GPT-4.1 Mini | Image → Text | from $0.44 / gen | — | — | Sep 2026 |
| GPT-4.1 Nano | Image → Text | from $0.11 / gen | — | — | Sep 2026 |
Install the SDK
TypeScript targets Node 20+ and ships with types; Python needs 3.10+ and is async. Over REST there is nothing to install: call https://api.picsart.com from any HTTP client.
npm install @picsart/ai-sdkpip install picsart-ai-sdkAuthenticate
Send your Picsart API key as a bearer token. The SDK does it for you once the client is created.
import { createClient } from '@picsart/ai-sdk';
const ai = createClient({
apiKey: process.env.PICSART_API_KEY, // sent as: Authorization: Bearer <key>
apiUrl: 'https://api.picsart.com',
});import os
from picsart_ai_sdk import create_client
ai = create_client(
api_key=os.environ["PICSART_API_KEY"], # sent as: Authorization: Bearer <key>
api_url="https://api.picsart.com",
)Authorization: Bearer <PICSART_API_KEY>Make a request
Call the model by its id. Over REST, one endpoint serves every model: POST /workflows/v1/models/execute with the model id and its input in the body. The outer params is the envelope every workflow takes; the inner one is this model's input, with the same names generateText() / generate_text() takes.
import { createClient } from '@picsart/ai-sdk';
const ai = createClient({
apiKey: process.env.PICSART_API_KEY,
apiUrl: 'https://api.picsart.com',
});
const { text } = await ai.generateText('gpt-4o-mini', {
prompt: "A serene mountain lake at golden hour, ultra detailed"
});
console.log(text);import asyncio
import os
from picsart_ai_sdk import create_client
async def main() -> None:
async with create_client(
api_key=os.environ["PICSART_API_KEY"],
api_url="https://api.picsart.com",
) as ai:
res = await ai.generate_text("gpt-4o-mini", {
"prompt": "A serene mountain lake at golden hour, ultra detailed",
})
print(res.text)
asyncio.run(main())curl -X POST 'https://api.picsart.com/workflows/v1/models/execute' \
-H 'Authorization: Bearer $PICSART_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"params": {
"model": "gpt-4o-mini",
"params": {
"prompt": "A serene mountain lake at golden hour, ultra detailed"
}
}
}'Parameters
2 parameters, the same for the SDK and for the inner params over REST. Required ones must be supplied; the rest fall back to their defaults.
| Parameter | Type | Required | Default | Details |
|---|---|---|---|---|
promptThe message or question for the model, in plain language. With input images, what to say about them. | text | yes | — | — |
imageUrlsImages for the model to look at, as URLs. | file (image[]) | no | — | — |
Response
generateText() resolves to the generated text. Over REST the output is at response.result, inside the gateway's status envelope with the task id, its status and the amount charged.
{
"text": "…generated text…",
"model": "gpt-4o-mini"
}{
"status": "success",
"response": {
"id": "task_abc123",
"status": "COMPLETED",
"result": {
"text": "…generated text…",
"model": "gpt-4o-mini"
}
}
}Overview
Text models are also served through an LLM proxy that speaks each vendor's own API. Requests and responses — streaming included — pass through exactly as the vendor defines them, so code written against the vendor's API or official SDK works here by changing only the base URL and the API key.
The same model is also reachable through one OpenAI-compatible Chat Completions endpoint that serves Claude, GPT and Gemini alike — switch vendors by changing model. When you'd rather use Picsart's own parameter names, use the unified API.
Authenticate with your Picsart API key, as Authorization: Bearer <key> (see Authentication). Any vendor credentials you send are ignored.
Endpoints
All on https://api.picsart.com, with gpt-4o-mini as the model id.
| API | Endpoint | Request body |
|---|---|---|
| Chat Completions (unified) | POST /llm-proxy/openai/v1/chat/completions | OpenAI reference |
| Responses (native) | POST /llm-proxy/openai/v1/responses | Vendor reference |
Chat Completions
One endpoint and one client for every text model, with the OpenAI SDK (pip install openai / npm install openai). The vendor is picked from model, so switching to another model means changing only that.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["PICSART_API_KEY"],
base_url="https://api.picsart.com/llm-proxy/openai/v1",
)
completion = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(completion.choices[0].message.content)import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PICSART_API_KEY,
baseURL: 'https://api.picsart.com/llm-proxy/openai/v1',
});
const completion = await client.chat.completions.create({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: 'Write a haiku about the ocean.' }],
});
console.log(completion.choices[0].message.content);curl -X POST 'https://api.picsart.com/llm-proxy/openai/v1/chat/completions' \
-H "Authorization: Bearer $PICSART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'Responses (native)
The vendor's own Responses API with the OpenAI SDK (pip install openai / npm install openai) — the request bodies are the vendor's own, unchanged.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["PICSART_API_KEY"],
base_url="https://api.picsart.com/llm-proxy/openai/v1",
)
response = client.responses.create(
model="gpt-4o-mini",
input="Write a haiku about the ocean.",
)
print(response.output_text)import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.PICSART_API_KEY,
baseURL: 'https://api.picsart.com/llm-proxy/openai/v1',
});
const response = await client.responses.create({
model: 'gpt-4o-mini',
input: 'Write a haiku about the ocean.',
});
console.log(response.output_text);curl -X POST 'https://api.picsart.com/llm-proxy/openai/v1/responses' \
-H "Authorization: Bearer $PICSART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"input": "Write a haiku about the ocean."
}'Rates
What this model costs per generation, in USD. Every row is an exact rate — the columns are the settings that change it.
| Tier | Rate |
|---|---|
| Cache write | $0.00 / 1M cache write tokens |
| Cached input | $0.075 / 1M cached input tokens |
| Input | $0.15 / 1M input text tokens |
| Generation | $0.165 / generation |
| Output text | $0.60 / 1M output text tokens |