توليد الصور
استخدم CometAPI مع OpenAI POST /v1/images/generations لإنشاء صور من المطالبات النصية، واتبع دليل توليد الصور الرسمي لعناصر التحكم الخاصة بكل model.
استخدم هذا المسار لإنشاء صور من النص باستخدام صيغ طلبات متوافقة مع OpenAI على CometAPI.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
المرجع الرسمي
- اقرأ دليل OpenAI لتوليد الصور قبل الاعتماد على عناصر التحكم الخاصة بكل model مثل
backgroundوoutput_compressionوStreaming أو خيارات صور GPT المستقبلية. - استخدم مرجع OpenAI لإنشاء صورة للحصول على القائمة الحالية للمعلمات.
اختر model أولاً
- استخدم
dall-e-3عندما تريد طلبًا أوليًا بسيطًا معresponse_format - استخدم model صور GPT عندما تحتاج إلى عناصر تحكم خاصة بـ GPT مثل
output_formatأوqualityأوbackground - استخدم
qwen-imageعندما تحتاج إلى هذا المزود تحديدًا، ولكن أبقِnعلى 1
أول طلب آمن
- ابدأ بـ
dall-e-3 - أبقِ
sizeعلى1024x1024 - اضبط
response_format: "url"إذا كنت تريد استجابة JSON صغيرة ورابط تنزيل مؤقت - استخدم مثال طلب GPT المتحقق منه في مرجع API إذا كنت بحاجة إلى معلمات model صور GPT
- أضف
output_formatفقط عندما تحتاج إلى نوع صورة مُرمّز محدد مثلjpeg - راجع دليل OpenAI لتوليد الصور قبل إضافة
backgroundأوoutput_compressionأو Streaming - استخدم Prompt واحدًا وصورة ناتجة واحدة قبل إضافة التوليد الدفعي أو ضبط النمط
سلوك الطلب الخاص بكل model
- ينطبق
response_formatعلىdall-e-2وdall-e-3 - تستخدم نماذج صور GPT عناصر تحكم خاصة بـ GPT مثل
output_formatوqualityوbackgroundوoutput_compression - اتبع دليل OpenAI لتوليد الصور للحصول على أحدث الخيارات الخاصة بكل model
- لا يدعم
qwen-imageالقيمةn > 1
التفويضات
Bearer token authentication. Use your CometAPI key.
الجسم
The image generation model to use. Choose a current model from the Models page.
Text description of the image you want to generate.
"A paper boat floating on calm water at sunrise."
Number of images to generate. Keep this at 1 for the broadest compatibility.
Quality setting for models that support it. See the OpenAI image generation guide for the latest model-specific values.
Requested output size. Supported values depend on the selected model. See the OpenAI image generation guide for the latest model-specific ranges.
"1024x1024"
The response container for dall-e-2 and dall-e-3. This parameter is not supported for GPT image models, which return base64-encoded image data.
url, b64_json The encoded image type for GPT image model results, such as png, jpeg, or webp. See the OpenAI image generation guide for current GPT image output controls.
"jpeg"
الاستجابة
Image generation result.
Unix timestamp for the completed generation.
Background mode returned by models that expose it.
Encoded image type returned by GPT image models.
Quality level returned by models that expose it.
Output size returned by models that expose it.