Skip to content
هذه الصفحة غير متاحة بلغتك بعد، لذا تُعرض باللغة الإنجليزية.
xAI · Grok Imagine

grok-imagine-image API

Generate images from text or edit reference images with xAI's grok-imagine-image on APISea.

إنشاء الصورالصورمهمة غير متزامنة
معرّف النموذج
grok-imagine-image

تسعير API لنموذج grok-imagine-image

جميع الأسعار بالدولار الأمريكي (USD). مقارنة أسعار APISea بالسعر الرسمي المعلن للوحدة نفسها.

الخيارAPISeaرسميوفّر
1Kافتراضي$0.0176$0.02−12%
2K$0.0176$0.02−12%

الأسعار لكل صورة.

مواد الإدخال

الخيارالوحدةAPISeaرسمي
Defaultلكل صورة$0.00176$0.002

ما هو grok-imagine-image؟

grok-imagine-image is an xAI image model in the Grok Imagine family, available through APISea for text-to-image generation and reference-based editing. Build image creation workflows from text prompts, edit a single supplied image, or provide multiple images as references. The model supports multilingual prompts, 1K and 2K output resolutions, and 1–10 outputs per request. Aspect ratio controls include square, landscape, portrait, and an automatic setting.

Submit requests to POST /v1/images/generations with grok-imagine-image explicitly selected as the model. Processing is asynchronous: submission returns a task identifier, which you use to query progress until completion or failure. APISea provides one API key and an OpenAI-compatible base URL, https://api.apisea.ai/v1, with pay-as-you-go billing only for successful requests. APISea 1K and 2K generation each cost $0.0176 per image; reference image input costs $0.00176 per image. The default configuration is about 12% below the provider list price.

أبرز مزايا grok-imagine-image

Generation and Editing

Generate images from text alone or include reference image URLs for editing. One reference supports single-image editing; multiple images provide multi-image references.

Resolution and Layout

Choose 1k or 2k resolution and a supported aspect ratio. The defaults are 1k resolution and auto aspect ratio.

Multiple Image Outputs

Request 1–10 images with the n parameter. Include up to five reference images for reference-based workflows.

Optional Prompt Moderation

Set nsfw_check to true to review prompts and input images with omni-moderation-latest before submission. It defaults to false.

كيفية استدعاء API الخاص بـ grok-imagine-image في 4 خطوات

  1. 01

    احصل على API key

    سجّل الدخول إلى APISea، واشحن رصيدك بدءًا من $50، وأنشئ مفتاح sk-sea من وحدة التحكم.

  2. 02

    اضبط عنوان URL الأساسي

    استخدم https://api.apisea.ai/v1 عنوانًا أساسيًا في SDK أو عميل HTTP.

  3. 03

    أرسل الطلب

    استدعِ POST /v1/images/generations مع "model": "grok-imagine-image" والمعلمات أدناه.

  4. 04

    تعامل مع الاستجابة

    تتضمن الاستجابة task_id. أرسل طلبات GET /v1/tasks/{task_id} دوريًا حتى تصبح الحالة completed، ثم نزّل روابط النتائج.

# model can be "grok-imagine-image", or the compatible alias "grok-imagine-1.5-ext"
curl --request POST \
  --url https://api.apisea.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok-imagine-image",
    "prompt": "An orange cat sitting on a sunny windowsill, oil painting style",
    "size": "1:1",
    "n": 1
  }'

المعلمات

المعلمةالنوعمطلوبافتراضيالوصف
modelstringمطلوبgrok-imagine-1.5-apiseaImage generation model name
nsfw_checkbooleanاختياريfalseWhether to run content moderation before submitting the image task.
promptstringمطلوب—Text description for image generation or editing, supports multiple languages
image_urlsstring[]اختياري—Reference image URL list. **Omit for text-to-image; include for image editing**.
sizestringاختياري1:1Output image size
nintegerاختياري1Number of images to generate

ما الذي يمكنك إنشاؤه باستخدام grok-imagine-image

Creative Concept Generation

Build a tool that turns written creative briefs into images, requesting several outputs for team review.

Background Editing

Let users supply an image and describe a background change through a reference-based editing workflow.

Style Exploration

Create an interface for prompting style edits to a supplied image or using multiple images as references.

Layout-Specific Asset Creation

Generate images in square, portrait, or landscape formats for different placement requirements using aspect_ratio.

نصائح للحصول على نتائج أفضل

  • 01

    Select the Model Explicitly

    Set model to grok-imagine-image rather than relying on the endpoint's documented default. Use resolution and aspect_ratio for this model, and omit quality.

  • 02

    Prepare Reference Inputs

    Omit image_urls for text-to-image requests; include 1–5 publicly accessible absolute HTTP or HTTPS URLs for editing or references. Upload local files through POST /v1/uploads/images and use the returned URLs.

  • 03

    Control Output Count

    Send n as an unquoted integer from 1 to 10. Both APISea 1K and APISea 2K cost $0.0176 per image, so choose output count with per-image billing in mind.

  • 04

    Poll and Save Results

    Use data.id or data.poll_url from the submission response to query progress until completed or failed. Save generated images promptly because their links are valid for 24 hours.

القيود ومعلومات مهمة

  • Generation is asynchronous and requires subsequent task-status queries.

  • Prompts must be non-empty after trimming and no longer than 8,000 characters.

  • Requests support up to five reference images and 10 outputs; the quality parameter is unsupported.

الأسئلة الشائعة حول API الخاص بـ grok-imagine-image

How much does grok-imagine-image cost on APISea?

APISea 1K costs $0.0176 per image, and APISea 2K costs $0.0176 per image, compared with a provider list price of $0.02 per image for each. Reference image input (Default) costs $0.00176 per image; the default configuration is about 12% below the provider list price.

How do I call grok-imagine-image through the API?

Send a Bearer-authenticated POST request to https://api.apisea.ai/v1/images/generations with model set to grok-imagine-image and a required prompt. Use the returned data.id or data.poll_url to query the asynchronous task until it completes or fails.

Which resolution and aspect ratio parameters are supported?

Set resolution to 1k or 2k; the default is 1k. Set aspect_ratio to auto or a supported ratio such as 1:1, 16:9, 9:16, 3:2, or 2:3; do not send quality.

How many reference images and outputs can I request?

You can provide 1–5 reference images and request 1–10 outputs using n. Omit image_urls for text-to-image generation, and keep prompts within 8,000 characters.

Can I use generated images commercially?

Commercial use is subject to the provider's terms. Review the applicable xAI terms before using generated images in a commercial product or campaign.

How does grok-imagine-image compare with grok-imagine-image-quality?

The quality-named sibling is positioned as a higher-capability tier, but these facts provide no comparative quality measurements. Both support 1k and 2k outputs and 1–10 outputs per request; grok-imagine-image accepts up to five reference images, while grok-imagine-image-quality accepts up to three.

نماذج ذات صلة

العمق: أكثر من 250 نموذجًا · الحد الأدنى لشحن الرصيد $50

ابدأ التطوير باستخدام grok-imagine-image

مفتاح واحد، وادفع حسب الاستخدام بدءًا من $50؛ ولا تُحتسب الرسوم إلا على الطلبات الناجحة.