Grok Imagine Image 2.0 API

Text-to-image plus multi-reference editing with up to three source images, selectable quality tiers, and 1K or 2K output resolution.

xAIBilderzeugungVeröffentlicht 7. Aug. 2026Proprietärer EndpointNeu

Über Grok Imagine Image 2.0

Text-to-image plus multi-reference editing with up to three source images, selectable quality tiers, and 1K or 2K output resolution.

Auch bekannt als Grok Imagine Image, xAI Grok Imagine Image 2.0

image generationimage editingmulti imagetext rendering

Grok Imagine Image 2.0 Spezifikationen

Modell-ID
grok-imagine-image-2-0
Anbieter
xAI
Kategorie
Bilderzeugung
Veröffentlicht
7. Aug. 2026
Eingabe
TextBild
Ausgabe
Bild
Endpoints
POST/v1/images/generationsPOST/v1/images/edits
Alternative Modell-IDs
grok-imagine-image-2grok-imagine-image-2.0xai/grok-imagine-image-2-0xai/grok-imagine-image-2xai/grok-imagine-image-2.0

Grok Imagine Image 2.0 API-Preise

Live Pay-as-you-go-Preise aus dem EmpirioLabs-Katalog. Du zahlst nur für das, was du nutzt, ohne monatliches Minimum.

Typ
Spezifikation
Preis
Low quality, 1K
per image
$0.048
Low quality, 2K
per image
$0.072
Medium quality, 1K
per image
$0.072
Medium quality, 2K
per image
$0.096
Image input
per image
$0.05
Auf der vollständigen Preisseite vergleichen

So rufst du die Grok Imagine Image 2.0 API auf

Grok Imagine Image 2.0 läuft über POST /v1/images/generations. Der Request liefert sofort eine job_id; frage GET /v1/jobs/{job_id} ab, bis der Job abgeschlossen ist, und lies die Ausgabe-URLs aus dem Ergebnis. Oder füge "sync": true hinzu, um das Polling zu überspringen: Der Request bleibt offen und liefert direkt die fertige OpenAI-artige Bildantwort, sodass OpenAI SDKs unverändert funktionieren. Hol dir einen API-Schlüssel im EmpirioLabs Dashboard.

cURL: Job senden
curl https://api.empiriolabs.ai/v1/images/generations \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2-0",
    "prompt": "Describe what you want Grok Imagine Image 2.0 to generate."
  }'
cURL: Ergebnis abfragen
curl https://api.empiriolabs.ai/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"
Python
import requests

response = requests.post(
    "https://api.empiriolabs.ai/v1/images/generations",
    headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
    json={
        "model": "grok-imagine-image-2-0",
        "prompt": "Describe what you want Grok Imagine Image 2.0 to generate.",
    },
)
job = response.json()

# Generation runs as an async job. Poll until it completes.
import time
while True:
    status = requests.get(
        f"https://api.empiriolabs.ai/v1/jobs/{job['job_id']}",
        headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
    ).json()
    if status.get("status") in ("completed", "failed"):
        print(status)
        break
    time.sleep(5)
Vollständige Grok Imagine Image 2.0 API-Referenz

Grok Imagine Image 2.0 API-Parameter

Request-Parameter, die die Grok Imagine Image 2.0 API auf EmpirioLabs unterstützt. Standardwerte gelten, wenn ein Feld weggelassen wird.

ParameterTypStandardBereich / WerteBeschreibung
promptstring--Describe the image to create. With source images attached, this becomes the editing instruction. Refer to multiple images as <IMAGE_0>, <IMAGE_1>, and so on. Up to...
imagearray--One to three source images to edit, as URLs, data URIs, or uploaded image objects. Leave empty to generate from the prompt alone.
imagesarray--Plural alias for multiple uploaded image references.
qualityenummediumlow, mediumRendering quality. Low returns in a few seconds and costs less per image. Medium takes longer and resolves finer detail.
resolutionenum1k1k, 2kOutput resolution tier. 2k renders more pixels and costs more per image than 1k.
aspect_ratioenumautoauto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, ...Output aspect ratio. Auto lets the model pick the best fit for the prompt. For an edit, auto follows the first source image.
num_imagesnumber11 bis 10Number of output images. Each output image is billed separately.
response_formatenumurlurl, b64_jsonReturn signed image URLs by default, or include base64 image data when b64_json is requested.

Gut zu wissen

Generates images from a text prompt, or edits up to three source images from a natural-language instruction.

Modes

  • Text-to-image: send a prompt with no image.
  • Image editing: attach one image and describe the change you want.
  • Multi-image editing: attach two or three images to combine subjects, transfer a style, or compose a scene. Refer to them in the prompt as <IMAGE_0>, <IMAGE_1>, and so on.

Example multi-image prompt

Place the product from <IMAGE_0> onto the marble surface in <IMAGE_1>.

Defaults

  • Medium quality at 1K resolution
  • Auto aspect ratio, so the model picks the best fit for the prompt
  • One output image per request

Quality and resolution

Quality selects how much work goes into the render: low returns in a few seconds, medium takes longer and resolves finer detail. Resolution selects the 1K or 2K output tier. The two combine into four price points, so a low 1K image is the cheapest option and a medium 2K image the most detailed.

Controls

Supports prompt, source images (URL or upload), quality, resolution, aspect ratio across fourteen ratios including auto, number of images, and response format.

Limits

  • Up to 3 source images per edit
  • Up to 10 output images per request
  • Prompt up to 8,000 characters

Billing

  • Charged per output image at the selected quality and resolution, plus a per-image fee for each source image you attach. Text-to-image has no source-image fee.
  • A request that fails validation or is rejected before any image is produced is not billed.
  • An image that is produced but then blocked by content policy is still billed. This follows xAI usage policy, which charges for the generation even when the output is blocked by the content safety check. Keep prompts and source images within the usage policy to avoid this.

Content safety

Generated images pass an automated content-safety check. An image flagged as explicit is not returned. Because the image is generated before the check runs, a flagged generation is still billed.

Grok Imagine Image 2.0 API: häufige Fragen

Wie viel kostet die Grok Imagine Image 2.0 API?

Auf EmpirioLabs wird Grok Imagine Image 2.0 nach Verbrauch abgerechnet: Low quality, 1K $0.048 per image; Low quality, 2K $0.072 per image; Medium quality, 1K $0.072 per image. Die Live-Preistabelle auf dieser Seite entspricht immer dem, was die API berechnet.

Welchen Endpoint verwendet Grok Imagine Image 2.0?

Grok Imagine Image 2.0 wird über POST /v1/images/generations auf api.empiriolabs.ai mit normaler Bearer-Token-Authentifizierung bereitgestellt.

Kann ich Grok Imagine Image 2.0 im Browser testen, bevor ich integriere?

Ja. Der EmpirioLabs Playground führt Grok Imagine Image 2.0 im Browser mit denselben Parametern aus, die die API bietet. So kannst du Prompts testen, bevor du Code schreibst.

Wie bekomme ich einen Grok Imagine Image 2.0 API-Schlüssel?

Erstelle ein EmpirioLabs-Konto und generiere dann einen Schlüssel unter API Keys im Dashboard. Die Abrechnung erfolgt über Pay-as-you-go-Guthaben, du zahlst also nur für deine Requests.

Bereit, bessere Endpunkte zu nutzen?

Schauen Sie sich unsere Preise an oder kontaktieren Sie uns, wenn Sie Ihr eigenes Modell auf unserem Stack implementieren möchten.