GPT-5.4 Mini

GPT-5.4 Mini is a compact, efficient variant of GPT-5.4 designed for coding assistants, subagent orchestration, and multimodal applications requiring faster responsiveness. It supports a 400K token context window and retains native computer use and configurable reasoning effort at a lower cost than the flagship model.
Newer in this family:GPT-6.2 AstraGPT-6.2 SolGPT-6.1 Terra

Complete technical specification for integration
Ready-to-use code snippets for common workflows
code-interpreter
Neighborhood Bistro Menu Profitability Analysis$0.0128~16s## Executive summary
- **Total dinner-menu sales revenue:** **$35,719.00**
- **Total adjusted contribution:** **$19,279.30**
- **Adjusted contribution margin percentage:** **54.0%**
Cutoffs used for menu engineering:
- **Popularity cutoff (median units sold): 107**
- **Margin cutoff (median adjusted contribution/portion): $13.73**
---
## Compact menu performance table
Sorted by **total contribution descending**
| Item | Units Sold | Price | Waste-Adj. Ingredient Cost | Labor Cost | Adj. CM / Portion | Total Contribution | Contribution / Active Prep Min | Class |
|---|---:|---:|---:|---:|---:|---:|---:|---|
| Roast Chicken | 186 | $24.00 | $7.55 | $2.20 | $14.25 | $2,649.91 | $2.59 | Star |
| Steak Frites | 164 | $34.00 | $14.95 | $3.00 | $16.05 | $2,632.63 | $2.14 | Star |
| Bistro Burger | 211 | $21.00 | $8.04 | $1.60 | $11.36 | $2,396.70 | $2.84 | Plowhorse |
| Pork Schnitzel | 129 | $26.00 | $8.82 | $2.40 | $14.78 | $1,906.98 | $2.46 | Star |
| Braised Short Rib | 118 | $31.00 | $12.29 | $2.60 | $16.11 | $1,900.78 | $2.48 | Star |
| Mushroom Tagliatelle | 142 | $22.00 | $5.93 | $2.80 | $13.27 | $1,883.76 | $1.90 | Plowhorse |
| Seared Trout | 96 | $28.00 | $10.91 | $3.20 | $13.89 | $1,333.53 | $1.74 | Puzzle |
| Ricotta Gnocchi | 83 | $24.00 | $6.63 | $3.80 | $13.57 | $1,126.38 | $1.43 | Dog |
| Market Risotto | 72 | $25.00 | $7.67 | $4.20 | $13.13 | $945.04 | $1.25 | Dog |
| Duck Confit | 61 | $30.00 | $11.30 | $4.00 | $14.70 | $896.43 | $1.47 | Puzzle |
| Crispy Eggplant | 78 | $20.00 | $5.06 | $3.60 | $11.34 | $884.61 | $1.26 | Dog |
| Cauliflower Steak | 54 | $23.00 | $6.22 | $3.40 | $13.38 | $722.55 | $1.57 | Dog |
### Notes on the metrics
- **Waste-adjusted ingredient cost/portion** = ingredient cost ÷ (1 − waste%)
- **Labor cost/portion** = prep minutes × $24/hr ÷ 60
- **Adjusted contribution/portion** = price − waste-adjusted ingredient cost − labor cost
- **Total contribution** = adjusted contribution/portion × units sold
- **Contribution per active prep minute** = total contribution ÷ total active prep minutes used across sold portions
---
## Strongest 3 dishes operationally
1. **Roast Chicken**
- Highest total contribution: **$2,649.91**
- Strong margin per portion: **$14.25**
- Good labor efficiency: **$2.59 per active prep minute**
2. **Steak Frites**
- Total contribution: **$2,632.63**
- Highest per-portion margin in the top sellers: **$16.05**
- Solid labor efficiency: **$2.14 per active prep minute**
3. **Bistro Burger**
- High volume leader: **211 units**
- Strong total contribution: **$2,396.70**
- Best labor efficiency in the set: **$2.84 per active prep minute**
---
## Weakest 3 dishes operationally
1. **Cauliflower Steak**
- Lowest total contribution: **$722.55**
- Low volume: **54 units**
- Weak margin profile: **$13.38 per portion**
- Low labor efficiency: **$1.57 per active prep minute**
2. **Crispy Eggplant**
- Total contribution: **$884.61**
- Low margin per portion: **$11.34**
- High labor burden: **$3.60 labor cost/portion**
- Low labor efficiency: **$1.26 per active prep minute**
3. **Duck Confit**
- Total contribution: **$896.43**
- Low volume: **61 units**
- Heavy prep time: **10.0 minutes**
- Lower labor efficiency: **$1.47 per active prep minute**
---
## Recommendations
1. **Protect and feature the Stars**
- Keep **Roast Chicken, Steak Frites, Braised Short Rib, and Pork Schnitzel** prominent on the menu.
- They combine strong contribution and, in most cases, high popularity or high margin.
- Consider small price increases only if service execution stays consistent.
2. **Fix or rework the low-efficiency items**
- **Crispy Eggplant, Cauliflower Steak, Market Risotto, and Duck Confit** have weak contribution per active minute and/or low total contribution.
- Review prep steps, garnish complexity, and portioning to reduce labor and waste.
- If no simplification is possible, these are candidates for removal or replacement.
3. **Use Plowhorses and Puzzles strategically**
- **Bistro Burger** and **Mushroom Tagliatelle** sell well but have softer margin profiles; test modest pricing or ingredient-cost controls.
- **Seared Trout** and **Duck Confit** have acceptable-to-strong margin per portion but lower popularity; keep quality high and consider menu placement or server highlighting rather than discounting.
---
## How the classification was done
I used the **median** as the cutoff for both axes:
- **Popularity**: units sold
- **Margin**: adjusted contribution margin per portion
Rules:
- Values **equal to or above** the median are treated as **High**
- Values **below** the median are treated as **Low**
Menu-engineering categories:
- **Star** = High popularity, High margin
- **Plowhorse** = High popularity, Low margin
- **Puzzle** = Low popularity, High margin
- **Dog** = Low popularity, Low margin
If you'd like, I can also turn this into a one-page manager report or a spreadsheet-ready CSV.stopimport { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'openai:gpt@5.4-mini',
messages: [
{
role: 'user',
content: 'Act as a restaurant operations analyst for Juniper Table, a 54-seat neighborhood bistro. Use Python to analyze the following 14-day dinner-menu data.\n\nitem,units_sold,price_usd,ingredient_cost_usd,waste_pct,active_prep_minutes\nRoast Chicken,186,24,7.10,6,5.5\nMushroom Tagliatelle,142,22,5.40,9,7.0\nBraised Short Rib,118,31,11.80,4,6.5\nSeared Trout,96,28,9.60,12,8.0\nSteak Frites,164,34,14.20,5,7.5\nCrispy Eggplant,78,20,4.30,15,9.0\nBistro Burger,211,21,7.80,3,4.0\nDuck Confit,61,30,10.40,8,10.0\nCauliflower Steak,54,23,5.10,18,8.5\nPork Schnitzel,129,26,8.20,7,6.0\nRicotta Gnocchi,83,24,5.90,11,9.5\nMarket Risotto,72,25,6.60,14,10.5\n\nAssume active kitchen labor costs $24 per hour. For each dish, calculate:\n1. Waste-adjusted ingredient cost per sold portion = ingredient_cost_usd / (1 - waste_pct / 100).\n2. Labor cost per portion = active_prep_minutes × $24 / 60.\n3. Adjusted contribution margin per portion = price - waste-adjusted ingredient cost - labor cost.\n4. Total contribution over the 14-day period.\n5. Contribution earned per active prep minute.\n\nClassify each dish using the menu-engineering matrix, with the median units sold as the popularity cutoff and the median adjusted contribution margin per portion as the margin cutoff. Treat values equal to a cutoff as high. Categories are Star (high popularity, high margin), Plowhorse (high popularity, low margin), Puzzle (low popularity, high margin), and Dog (low popularity, low margin).\n\nReturn:\n- An executive summary with total sales revenue, total adjusted contribution, and adjusted contribution margin percentage.\n- A compact table for all dishes showing the calculated metrics and classification, sorted by total contribution descending.\n- The three strongest and three weakest dishes operationally, supported by the figures.\n- Three concrete recommendations covering pricing, preparation, promotion, or removal. Do not invent customer research or demand effects.\n- A concise explanation of the calculation and classification method.\n\nRound currency to two decimals and percentages to one decimal place.'
}
],
tools: [
{
type: 'codeInterpreter'
}
],
toolChoice: {
type: 'any'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "openai:gpt@5.4-mini",
"messages": [
{
"role": "user",
"content": "Act as a restaurant operations analyst for Juniper Table, a 54-seat neighborhood bistro. Use Python to analyze the following 14-day dinner-menu data.\n\nitem,units_sold,price_usd,ingredient_cost_usd,waste_pct,active_prep_minutes\nRoast Chicken,186,24,7.10,6,5.5\nMushroom Tagliatelle,142,22,5.40,9,7.0\nBraised Short Rib,118,31,11.80,4,6.5\nSeared Trout,96,28,9.60,12,8.0\nSteak Frites,164,34,14.20,5,7.5\nCrispy Eggplant,78,20,4.30,15,9.0\nBistro Burger,211,21,7.80,3,4.0\nDuck Confit,61,30,10.40,8,10.0\nCauliflower Steak,54,23,5.10,18,8.5\nPork Schnitzel,129,26,8.20,7,6.0\nRicotta Gnocchi,83,24,5.90,11,9.5\nMarket Risotto,72,25,6.60,14,10.5\n\nAssume active kitchen labor costs $24 per hour. For each dish, calculate:\n1. Waste-adjusted ingredient cost per sold portion = ingredient_cost_usd / (1 - waste_pct / 100).\n2. Labor cost per portion = active_prep_minutes × $24 / 60.\n3. Adjusted contribution margin per portion = price - waste-adjusted ingredient cost - labor cost.\n4. Total contribution over the 14-day period.\n5. Contribution earned per active prep minute.\n\nClassify each dish using the menu-engineering matrix, with the median units sold as the popularity cutoff and the median adjusted contribution margin per portion as the margin cutoff. Treat values equal to a cutoff as high. Categories are Star (high popularity, high margin), Plowhorse (high popularity, low margin), Puzzle (low popularity, high margin), and Dog (low popularity, low margin).\n\nReturn:\n- An executive summary with total sales revenue, total adjusted contribution, and adjusted contribution margin percentage.\n- A compact table for all dishes showing the calculated metrics and classification, sorted by total contribution descending.\n- The three strongest and three weakest dishes operationally, supported by the figures.\n- Three concrete recommendations covering pricing, preparation, promotion, or removal. Do not invent customer research or demand effects.\n- A concise explanation of the calculation and classification method.\n\nRound currency to two decimals and percentages to one decimal place."
}
],
"tools": [
{
"type": "codeInterpreter"
}
],
"toolChoice": {
"type": "any"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "textInference",
"taskUUID": "5e54bc13-3004-4ab1-8424-963a0f688d3e",
"model": "openai:gpt@5.4-mini",
"messages": [
{
"role": "user",
"content": "Act as a restaurant operations analyst for Juniper Table, a 54-seat neighborhood bistro. Use Python to analyze the following 14-day dinner-menu data.\n\nitem,units_sold,price_usd,ingredient_cost_usd,waste_pct,active_prep_minutes\nRoast Chicken,186,24,7.10,6,5.5\nMushroom Tagliatelle,142,22,5.40,9,7.0\nBraised Short Rib,118,31,11.80,4,6.5\nSeared Trout,96,28,9.60,12,8.0\nSteak Frites,164,34,14.20,5,7.5\nCrispy Eggplant,78,20,4.30,15,9.0\nBistro Burger,211,21,7.80,3,4.0\nDuck Confit,61,30,10.40,8,10.0\nCauliflower Steak,54,23,5.10,18,8.5\nPork Schnitzel,129,26,8.20,7,6.0\nRicotta Gnocchi,83,24,5.90,11,9.5\nMarket Risotto,72,25,6.60,14,10.5\n\nAssume active kitchen labor costs $24 per hour. For each dish, calculate:\n1. Waste-adjusted ingredient cost per sold portion = ingredient_cost_usd / (1 - waste_pct / 100).\n2. Labor cost per portion = active_prep_minutes × $24 / 60.\n3. Adjusted contribution margin per portion = price - waste-adjusted ingredient cost - labor cost.\n4. Total contribution over the 14-day period.\n5. Contribution earned per active prep minute.\n\nClassify each dish using the menu-engineering matrix, with the median units sold as the popularity cutoff and the median adjusted contribution margin per portion as the margin cutoff. Treat values equal to a cutoff as high. Categories are Star (high popularity, high margin), Plowhorse (high popularity, low margin), Puzzle (low popularity, high margin), and Dog (low popularity, low margin).\n\nReturn:\n- An executive summary with total sales revenue, total adjusted contribution, and adjusted contribution margin percentage.\n- A compact table for all dishes showing the calculated metrics and classification, sorted by total contribution descending.\n- The three strongest and three weakest dishes operationally, supported by the figures.\n- Three concrete recommendations covering pricing, preparation, promotion, or removal. Do not invent customer research or demand effects.\n- A concise explanation of the calculation and classification method.\n\nRound currency to two decimals and percentages to one decimal place."
}
],
"tools": [
{
"type": "codeInterpreter"
}
],
"toolChoice": {
"type": "any"
}
}
]'runware run openai:gpt@5.4-mini \
messages.0.role=user \
messages.0.content="Act as a restaurant operations analyst for Juniper Table, a 54-seat neighborhood bistro. Use Python to analyze the following 14-day dinner-menu data.
item,units_sold,price_usd,ingredient_cost_usd,waste_pct,active_prep_minutes
Roast Chicken,186,24,7.10,6,5.5
Mushroom Tagliatelle,142,22,5.40,9,7.0
Braised Short Rib,118,31,11.80,4,6.5
Seared Trout,96,28,9.60,12,8.0
Steak Frites,164,34,14.20,5,7.5
Crispy Eggplant,78,20,4.30,15,9.0
Bistro Burger,211,21,7.80,3,4.0
Duck Confit,61,30,10.40,8,10.0
Cauliflower Steak,54,23,5.10,18,8.5
Pork Schnitzel,129,26,8.20,7,6.0
Ricotta Gnocchi,83,24,5.90,11,9.5
Market Risotto,72,25,6.60,14,10.5
Assume active kitchen labor costs \$24 per hour. For each dish, calculate:
1. Waste-adjusted ingredient cost per sold portion = ingredient_cost_usd / (1 - waste_pct / 100).
2. Labor cost per portion = active_prep_minutes × \$24 / 60.
3. Adjusted contribution margin per portion = price - waste-adjusted ingredient cost - labor cost.
4. Total contribution over the 14-day period.
5. Contribution earned per active prep minute.
Classify each dish using the menu-engineering matrix, with the median units sold as the popularity cutoff and the median adjusted contribution margin per portion as the margin cutoff. Treat values equal to a cutoff as high. Categories are Star (high popularity, high margin), Plowhorse (high popularity, low margin), Puzzle (low popularity, high margin), and Dog (low popularity, low margin).
Return:
- An executive summary with total sales revenue, total adjusted contribution, and adjusted contribution margin percentage.
- A compact table for all dishes showing the calculated metrics and classification, sorted by total contribution descending.
- The three strongest and three weakest dishes operationally, supported by the figures.
- Three concrete recommendations covering pricing, preparation, promotion, or removal. Do not invent customer research or demand effects.
- A concise explanation of the calculation and classification method.
Round currency to two decimals and percentages to one decimal place." \
tools.0.type=codeInterpreter \
toolChoice.type=any{
"taskType": "textInference",
"taskUUID": "5e54bc13-3004-4ab1-8424-963a0f688d3e",
"model": "openai:gpt@5.4-mini",
"messages": [
{
"role": "user",
"content": "Act as a restaurant operations analyst for Juniper Table, a 54-seat neighborhood bistro. Use Python to analyze the following 14-day dinner-menu data.\n\nitem,units_sold,price_usd,ingredient_cost_usd,waste_pct,active_prep_minutes\nRoast Chicken,186,24,7.10,6,5.5\nMushroom Tagliatelle,142,22,5.40,9,7.0\nBraised Short Rib,118,31,11.80,4,6.5\nSeared Trout,96,28,9.60,12,8.0\nSteak Frites,164,34,14.20,5,7.5\nCrispy Eggplant,78,20,4.30,15,9.0\nBistro Burger,211,21,7.80,3,4.0\nDuck Confit,61,30,10.40,8,10.0\nCauliflower Steak,54,23,5.10,18,8.5\nPork Schnitzel,129,26,8.20,7,6.0\nRicotta Gnocchi,83,24,5.90,11,9.5\nMarket Risotto,72,25,6.60,14,10.5\n\nAssume active kitchen labor costs $24 per hour. For each dish, calculate:\n1. Waste-adjusted ingredient cost per sold portion = ingredient_cost_usd / (1 - waste_pct / 100).\n2. Labor cost per portion = active_prep_minutes × $24 / 60.\n3. Adjusted contribution margin per portion = price - waste-adjusted ingredient cost - labor cost.\n4. Total contribution over the 14-day period.\n5. Contribution earned per active prep minute.\n\nClassify each dish using the menu-engineering matrix, with the median units sold as the popularity cutoff and the median adjusted contribution margin per portion as the margin cutoff. Treat values equal to a cutoff as high. Categories are Star (high popularity, high margin), Plowhorse (high popularity, low margin), Puzzle (low popularity, high margin), and Dog (low popularity, low margin).\n\nReturn:\n- An executive summary with total sales revenue, total adjusted contribution, and adjusted contribution margin percentage.\n- A compact table for all dishes showing the calculated metrics and classification, sorted by total contribution descending.\n- The three strongest and three weakest dishes operationally, supported by the figures.\n- Three concrete recommendations covering pricing, preparation, promotion, or removal. Do not invent customer research or demand effects.\n- A concise explanation of the calculation and classification method.\n\nRound currency to two decimals and percentages to one decimal place."
}
],
"tools": [
{
"type": "codeInterpreter"
}
],
"toolChoice": {
"type": "any"
}
}Response
{
"taskType": "textInference",
"taskUUID": "5e54bc13-3004-4ab1-8424-963a0f688d3e",
"text": "## Executive summary\n\n- **Total dinner-menu sales revenue:** **$35,719.00**\n- **Total adjusted contribution:** **$19,279.30**\n- **Adjusted contribution margin percentage:** **54.0%**\n\nCutoffs used for menu engineering:\n- **Popularity cutoff (median units sold): 107**\n- **Margin cutoff (median adjusted contribution/portion): $13.73**\n\n---\n\n## Compact menu performance table \nSorted by **total contribution descending**\n\n| Item | Units Sold | Price | Waste-Adj. Ingredient Cost | Labor Cost | Adj. CM / Portion | Total Contribution | Contribution / Active Prep Min | Class |\n|---|---:|---:|---:|---:|---:|---:|---:|---|\n| Roast Chicken | 186 | $24.00 | $7.55 | $2.20 | $14.25 | $2,649.91 | $2.59 | Star |\n| Steak Frites | 164 | $34.00 | $14.95 | $3.00 | $16.05 | $2,632.63 | $2.14 | Star |\n| Bistro Burger | 211 | $21.00 | $8.04 | $1.60 | $11.36 | $2,396.70 | $2.84 | Plowhorse |\n| Pork Schnitzel | 129 | $26.00 | $8.82 | $2.40 | $14.78 | $1,906.98 | $2.46 | Star |\n| Braised Short Rib | 118 | $31.00 | $12.29 | $2.60 | $16.11 | $1,900.78 | $2.48 | Star |\n| Mushroom Tagliatelle | 142 | $22.00 | $5.93 | $2.80 | $13.27 | $1,883.76 | $1.90 | Plowhorse |\n| Seared Trout | 96 | $28.00 | $10.91 | $3.20 | $13.89 | $1,333.53 | $1.74 | Puzzle |\n| Ricotta Gnocchi | 83 | $24.00 | $6.63 | $3.80 | $13.57 | $1,126.38 | $1.43 | Dog |\n| Market Risotto | 72 | $25.00 | $7.67 | $4.20 | $13.13 | $945.04 | $1.25 | Dog |\n| Duck Confit | 61 | $30.00 | $11.30 | $4.00 | $14.70 | $896.43 | $1.47 | Puzzle |\n| Crispy Eggplant | 78 | $20.00 | $5.06 | $3.60 | $11.34 | $884.61 | $1.26 | Dog |\n| Cauliflower Steak | 54 | $23.00 | $6.22 | $3.40 | $13.38 | $722.55 | $1.57 | Dog |\n\n### Notes on the metrics\n- **Waste-adjusted ingredient cost/portion** = ingredient cost ÷ (1 − waste%)\n- **Labor cost/portion** = prep minutes × $24/hr ÷ 60\n- **Adjusted contribution/portion** = price − waste-adjusted ingredient cost − labor cost\n- **Total contribution** = adjusted contribution/portion × units sold\n- **Contribution per active prep minute** = total contribution ÷ total active prep minutes used across sold portions\n\n---\n\n## Strongest 3 dishes operationally\n\n1. **Roast Chicken** \n - Highest total contribution: **$2,649.91**\n - Strong margin per portion: **$14.25**\n - Good labor efficiency: **$2.59 per active prep minute**\n\n2. **Steak Frites** \n - Total contribution: **$2,632.63**\n - Highest per-portion margin in the top sellers: **$16.05**\n - Solid labor efficiency: **$2.14 per active prep minute**\n\n3. **Bistro Burger** \n - High volume leader: **211 units**\n - Strong total contribution: **$2,396.70**\n - Best labor efficiency in the set: **$2.84 per active prep minute**\n\n---\n\n## Weakest 3 dishes operationally\n\n1. **Cauliflower Steak** \n - Lowest total contribution: **$722.55**\n - Low volume: **54 units**\n - Weak margin profile: **$13.38 per portion**\n - Low labor efficiency: **$1.57 per active prep minute**\n\n2. **Crispy Eggplant** \n - Total contribution: **$884.61**\n - Low margin per portion: **$11.34**\n - High labor burden: **$3.60 labor cost/portion**\n - Low labor efficiency: **$1.26 per active prep minute**\n\n3. **Duck Confit** \n - Total contribution: **$896.43**\n - Low volume: **61 units**\n - Heavy prep time: **10.0 minutes**\n - Lower labor efficiency: **$1.47 per active prep minute**\n\n---\n\n## Recommendations\n\n1. **Protect and feature the Stars**\n - Keep **Roast Chicken, Steak Frites, Braised Short Rib, and Pork Schnitzel** prominent on the menu.\n - They combine strong contribution and, in most cases, high popularity or high margin.\n - Consider small price increases only if service execution stays consistent.\n\n2. **Fix or rework the low-efficiency items**\n - **Crispy Eggplant, Cauliflower Steak, Market Risotto, and Duck Confit** have weak contribution per active minute and/or low total contribution.\n - Review prep steps, garnish complexity, and portioning to reduce labor and waste.\n - If no simplification is possible, these are candidates for removal or replacement.\n\n3. **Use Plowhorses and Puzzles strategically**\n - **Bistro Burger** and **Mushroom Tagliatelle** sell well but have softer margin profiles; test modest pricing or ingredient-cost controls.\n - **Seared Trout** and **Duck Confit** have acceptable-to-strong margin per portion but lower popularity; keep quality high and consider menu placement or server highlighting rather than discounting.\n\n---\n\n## How the classification was done\n\nI used the **median** as the cutoff for both axes:\n- **Popularity**: units sold\n- **Margin**: adjusted contribution margin per portion\n\nRules:\n- Values **equal to or above** the median are treated as **High**\n- Values **below** the median are treated as **Low**\n\nMenu-engineering categories:\n- **Star** = High popularity, High margin\n- **Plowhorse** = High popularity, Low margin\n- **Puzzle** = Low popularity, High margin\n- **Dog** = Low popularity, Low margin\n\nIf you'd like, I can also turn this into a one-page manager report or a spreadsheet-ready CSV.",
"cost": 0.012842,
"finishReason": "stop"
}API Options
Platform-level options for task execution and delivery.
taskType
stringrequiredvalue: textInferenceIdentifier for the type of task being performed.
taskUUID
stringrequiredUUID v4UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.
outputFormat
stringdefault: TEXTSpecifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.
Allowed values1 value
webhookURL
stringuriWebhook URL that receives JSON responses via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.
Learn more1 resource
- WebhooksPLATFORM
- Webhooks
deliveryMethod
stringdefault: syncDetermines how the API delivers task results.
Allowed values3 values
- Returns results directly in the API response. Over HTTP, a task still running after 120 seconds continues as an async task and comes back with status 'processing'. Poll for its results using getResponse.
- Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.
- Streams results token-by-token as they are generated.
Learn more1 resource
- Task PollingPLATFORM
includeCost
booleandefault: trueInclude task cost in the response.
includeUsage
booleanInclude token usage statistics in the response.
numberResults
integermin: 1max: 4default: 1Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
Inputs
Input resources for the task (images, audio, etc). These must be nested inside the inputs object.
inputs object.inputs»imagesimages
array of stringsmin items: 11 limitArray of image inputs (UUID, URL, Data URI, or Base64).
Core Parameters
Primary parameters that define the task output.
model
stringrequiredvalue: openai-gpt-5-4-miniSend
autoinstead of an AIR identifier to have the model router choose the model for this task. The rest of the request is unchanged, every value you send is kept, and only the parameters you leave out are filled in. See Model Router.
seed
integermin: 0max: 9223372036854775807Random seed for reproducible generation. When not provided, a random seed is generated.
Learn more1 resource
- SeedLEARN
- Seed
messages
array of objectsrequiredmin items: 1Array of chat messages forming the conversation context. The final message must use the user role.
Settings
Technical parameters to fine-tune the inference process. These must be nested inside the settings object.
settings object.settings»systemPromptsystemPrompt
stringmin: 1max: 200000System-level instruction that guides the model's behavior and output style across the entire generation.
settings»temperaturetemperature
floatmin: 0max: 2step: 0.01default: 1Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity.
settings»topPtopP
floatmin: 0max: 1step: 0.01default: 0.95Nucleus sampling parameter that controls diversity by limiting the probability mass. Lower values make outputs more focused, higher values increase diversity.
settings»maxTokensmaxTokens
integermin: 1max: 128000default: 4096Maximum number of tokens to generate in the response.
settings»thinkingLevelthinkingLevel
stringControls the depth of internal reasoning the model performs before generating a response.
Allowed values4 values
toolChoice
objectControls how the model selects which tool to call. This only takes effect when
toolsare defined.Examples3 examples
Let the model decide (default):
"toolChoice": { "type": "auto" }Force a specific tool call:
"toolChoice": { "type": "tool", "name": "get_weather" }Require any tool call:
"toolChoice": { "type": "any" }Properties2 properties
toolChoice»typetype
stringrequiredStrategy the model uses to decide when and which tools to call.
Allowed values4 values
- Tool calls decided by the model from the conversation context. This is the recommended default.
- At least one tool call, with the model choosing which tool. Useful when you always need structured output.
- Call to the specific tool identified by
name. Use this to force a particular function call. - No tool calls, even if tools are defined. Useful for forcing a text-only response.
toolChoice»namename
stringName of the specific tool the model must call. Required when type is
tool.
tools
array of objectsmin items: 1An array of tool definitions that the model may call during generation. The model can invoke one or more tools based on the conversation context, outputting structured calls with arguments instead of (or alongside) free-text.
For
functiontools, each definition requires:type:"function"name: Unique identifier (alphanumeric, hyphens, underscores; max 64 chars).description: What the function does. The model uses this to decide when to call it.schema: JSON Schema object describing the expected input arguments.
The
searchtool is executed server-side by the provider. You don't need to handle the tool result yourself.The
codeInterpretertool is executed server-side by the provider. You don't need to handle the tool result yourself.Examples4 examples
Function tool, weather lookup:Built-in web search:"tools": [ { "type": "function", "name": "get_weather", "description": "Get current weather for a city", "schema": { "type": "object", "properties": { "city": { "type": "string", "description": "City name" } }, "required": ["city"] } } ], "toolChoice": { "type": "auto" }Built-in code interpreter:"tools": [ { "type": "search" } ]Multiple function tools:"tools": [ { "type": "codeInterpreter" } ]"tools": [ { "type": "function", "name": "search_products", "description": "Search the product catalog by query and filters.", "schema": { "type": "object", "properties": { "query": { "type": "string" }, "category": { "type": "string" } }, "required": ["query"] } }, { "type": "function", "name": "add_to_cart", "description": "Add a product to the user's shopping cart.", "schema": { "type": "object", "properties": { "productId": { "type": "string" }, "quantity": { "type": "integer", "minimum": 1 } }, "required": ["productId"] } } ]Properties4 properties
tools»typetype
stringrequiredKind of tool to make available to the model. User-defined functions require
nameandschema, while built-in tools (search,codeInterpreter) are executed server-side by the provider.Allowed values3 values
- User-defined function tool. The model outputs the tool name and arguments. You execute the function locally and send results back.
- Built-in web search. The provider executes search server-side and enriches the response automatically.
- Built-in code execution sandbox (Python). The provider runs code server-side and returns results automatically.
tools»namename
stringmax: 64Unique function name. Required for function tools.
tools»descriptiondescription
stringExplanation of what the function does, used by the model to decide when to call it.
tools»schemaschema
objectJSON Schema object describing the function's input parameters.