gpt-5-mini
مدل gpt-5-mini از OpenAI (ChatGPT) برای تولید متن و تکمیل مکالمات با قابلیت دریافت ورودیهای متنی و تصویری طراحی شده است. این مدل با استفاده از پروتکل openai_chat و endpoint /v1/chat/completions امکان تولید پاسخهای متنی و تصویری را فراهم میکند. کاربران میتوانند پارامترهایی مانند temperature و max_tokens را برای سفار
نمونه درخواست (Chat Completions)
# Required: model, messages (text + optional image_url)
# Optional gateway parameters:
# temperature: optional, default: 1
# max_tokens: optional, default: 1024 — Gateway از max_tokens میگیرد؛ برای این مدل به max_completion_tokens نگاشت میشود.
# top_p: optional, default: 1
# frequency_penalty: optional, default: 0
# presence_penalty: optional, default: 0
# image_url in messages: optional (multimodal input)
curl https://api.aifoapp.ir/v1/chat/completions \
-H "Authorization: Bearer aifo_sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-mini","messages":[{"role":"user","content":[{"type":"text","text":"تصویری از یک گربه در حال بازی با توپ را توصیف کنید."},{"type":"image_url","image_url":{"url":"https://example.com/image.jpg"}}]}],"temperature":1,"max_tokens":1024,"top_p":1,"frequency_penalty":0,"presence_penalty":0}' نمونه درخواست (Responses API)
این مدل علاوه بر Chat Completions از POST /v1/responses پشتیبانی میکند.
جزئیات در راهنمای Responses.
# Required: model, input — input_text + input_file.file_id (upload via /v1/files)
# Stateless: omit store or store:false; previous_response_id unsupported
curl https://api.aifoapp.ir/v1/responses \
-H "Authorization: Bearer aifo_sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-mini","input":[{"role":"user","content":[{"type":"input_text","text":"تصویری از یک گربه در حال بازی با توپ را توصیف کنید."},{"type":"input_file","file_id":"file_..."}]}]}' پارامترها
ورودیها
- متن: از طریق
messagesیاinput(بسته به endpoint) - تصویر (Chat):
image_urlداخلmessages - Responses:
POST /v1/responses— ورودی string یاinput_text/input_image/input_file(با AiFOfile_id). Stateless؛store: trueوprevious_response_idپشتیبانی نمیشوند. - تصویر (Responses):
input_imageباimage_url - فایل (Responses):
input_fileبا AiFOfile_id(قبل از ارسال به Gateway بهfile_dataتبدیل میشود)
فیلدهای الزامی body: model، messages
پارامترها
| نام | نوع | الزامی/اختیاری | پیشفرض | توضیح |
|---|---|---|---|---|
temperature |
number | اختیاری | 1 | — |
max_tokens |
number | اختیاری | 1024 | Gateway از max_tokens میگیرد؛ برای این مدل به max_completion_tokens نگاشت میشود. |
top_p |
number | اختیاری | 1 | — |
frequency_penalty |
number | اختیاری | 0 | — |
presence_penalty |
number | اختیاری | 0 | — |
FAQ
قیمت gpt-5-mini در AiFO چقدر است؟
قیمت ورودی 0.25 USD و خروجی 2 USD (per_1m_tokens) است.
gpt-5-mini برای چه کاربردی مناسب است؟
مدل gpt-5-mini از OpenAI (ChatGPT) برای تولید متن و تکمیل مکالمات با قابلیت دریافت ورودیهای متنی و تصویری طراحی شده است. این مدل با استفاده از پروتکل openai_chat و endpoint /v1/chat/completions امکان تولید پاسخهای متنی و تصویری را فراهم میکند. کاربران میتوانند پارامترهایی مانند temperature و max_tokens را برای سفار
چطور این مدل را از API صدا بزنم؟
یک API Key از پنل AiFO بگیرید، model را در body درخواست قرار دهید و درخواست را به gateway ارسال کنید. نمونه cURL و JavaScript در همین صفحه آمده است.