Μετάβαση στο περιεχόμενο

Grok Imagine Image

Ενσωμάτωση

id μοντέλου xai/grok-imagine-image
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/grok-imagine-image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Αυτό το αίτημα: 0,02 $ 20 πιστώσεις API Εκτέλεση σε αυτήν τη σελίδα

Λήψη κλειδιού API
xAI Κείμενο σε εικόνα έως 2k #xai#grok#text-to-image

Μετατροπή κειμένου σε εικόνα με Grok, 13 αναλογίες από 2:1 έως 1:2 και ανάλυση 1k ή 2k

Δημιουργήθηκε στο Doitong

Δημόσια έργα που δημιουργήθηκαν με το Grok Imagine Image από την κοινότητα του Doitong. Επαναχρησιμοποιήστε ένα prompt με ένα κλικ.

Δημόσιες δημιουργίες: 16
Art style: Professional portrait photography, cinematic lighting, realistic high detail. Арена, с...

Art style: Professional portrait photography, cinematic lighting, realistic high detail. Арена, свет софитов, на табло алые цифры 00:45. Трибуны полны и неподвижны. Медиум: Арина с чёрной повязкой на волосах держит сковороду правой рукой. Натан стоит за столом напротив, в его руке пинцет....

Art style: 3D Cartoon. Christopher Kolumbus. Ein wettergegerbter Navigator im mittleren Alter mit...

Art style: 3D Cartoon. Christopher Kolumbus. Ein wettergegerbter Navigator im mittleren Alter mit fokussierten bernsteinfarbenen Augen und vom Wind zerzaustem, dunklem Haar. Er trägt ein dunkles Wams aus Wolle mit Lederbesatz über einem Leinenhemd. Seine Haut ist von der Sonne gebräunt und zeigt...

Art style: 3D Cartoon. Columbus leaning in the middle ground. Columbus is leaning on deck in the ...

Art style: 3D Cartoon. Columbus leaning in the middle ground. Columbus is leaning on deck in the middle ground in the midground. Head in right profile. Eyes on water. Reaching down. Hopeful. Close-up at eye level, 9:16. Opening close-up, ending extreme close-up low angle. Key light side, cool...

Art style: 3D Cartoon. Sigmund sitting in the near foreground; Enkel crouching further back in th...

Art style: 3D Cartoon. Sigmund sitting in the near foreground; Enkel crouching further back in the frame. Distance across the rug. Sigmund is sitting on armchair in the near foreground in the midground. Torso in three-quarter turn to screen-right. Head in three-quarter turn to screen-right. Eyes...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, ador...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, adorable characters, family friendly. Майло. A tiny fluffy bright ginger-orange kitten with big expressive emerald-green eyes, a soft white chest, and four little white paws. He has a miniature pink nose...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, ador...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, adorable characters, family friendly. Барнаби. A plump chestnut-brown squirrel with an enormous fluffy tail, wearing a tiny carved acorn shell cap tilted slightly over one ear. He has sharp bright dark...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, ador...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, adorable characters, family friendly. Пип. A chubby, fluffy cream-and-caramel floppy-eared bunny wearing a small pastel blue fabric bow-tie around his neck. He has shiny round dark eyes, pink cheeks, and...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, ador...

Art style: Cute 3D animation, colorful Pixar-inspired style, bright lighting, soft textures, adorable characters, family friendly. Мама-птица и Птенчик. A tiny, round baby bluebird covered in soft pastel-blue downy feathers with gigantic blinking dark eyes and an open yellow beak, perched...

Δημιουργία αιτήματος

Τα στοιχεία ελέγχου δημιουργούνται από το σχήμα του μοντέλου. Ο κώδικας και η τιμή ενημερώνονται καθώς τα αλλάζετε.

•απαιτείται 88 / 8000

Κειμενική περιγραφή της εικόνας προς δημιουργία.

resolution προεπιλογή 1k

Επιλογή ανάλυσης εικόνας μεταξύ standard (`1k`) και high (`2k`).

προεπιλογή 1:1

Αναλογία πλάτους προς ύψος για την εικόνα εξόδου.

num_images προεπιλογή 1

Πλήθος εικόνων προς παραγωγή.

Για προχωρημένους output_format · enable_safety_checker
output_format προεπιλογή jpeg

Μορφή αρχείου της τελικής εικόνας.

POST /run/xai/grok-imagine-image?wait=20 προσφορά → 0,02 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/grok-imagine-image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Εκτέλεση αυτού του αιτήματος

Το κλειδί σας παραμένει σε αυτό το πρόγραμμα περιήγησης: αποστέλλεται μόνο στο Doitong API και αποθηκεύεται (localStorage) μόνο αν ενεργοποιήσετε την επιλογή «Να απομνημονεύεται». Λήψη κλειδιού API

Σχετικά με το Grok Imagine Image

Παράγει έως 4 εικόνες από prompt έως 8000 χαρακτήρων. Το `aspect_ratio` προσφέρει 13 επιλογές, συμπεριλαμβανομένων των 16:9, 4:3, 1:1, 9:16 και εξαιρετικά ευρέων ή ψηλών αναλογιών, ενώ η `resolution` είναι 1k ή 2k. Η έξοδος είναι jpeg, png ή webp. Η απόκριση επιστρέφει επίσης το αναθεωρημένο prompt που χρησιμοποιήθηκε τελικά.

Παράμετροι

Στείλτε είτε το κανονικό όνομα είτε το εγγενές όνομα, όχι και τα δύο. Κανονικά ονόματα

ΌνομαΤύπος ΠροεπιλογήΕπιτρεπόμενο Περιγραφή
promptαπαιτείται
Τύποςstring
≤ 8.000 χαρακτήρες
Κειμενική περιγραφή της εικόνας προς δημιουργία.
num_imagesπροαιρετικό num_outputs
Τύποςinteger
Προεπιλογή1
1 – 4
Πλήθος εικόνων προς παραγωγή.
aspect_ratioπροαιρετικό
Τύποςenum
Προεπιλογή1:1
2:120:919.5:916:94:33:21:12:33:49:169:19.59:201:2
Αναλογία πλάτους προς ύψος για την εικόνα εξόδου.
resolutionπροαιρετικό
Τύποςenum
Προεπιλογή1k
1k2k
Επιλογή ανάλυσης εικόνας μεταξύ standard (`1k`) και high (`2k`).
output_formatπροαιρετικό
Τύποςenum
Προεπιλογήjpeg
jpegpngwebp
Μορφή αρχείου της τελικής εικόνας.
enable_safety_checkerπροαιρετικό
Τύποςboolean
Προεπιλογήtrue
Ο έλεγχος μπορεί να χαλαρώσει με τη ρύθμιση false, εφόσον ο καλών είναι εξουσιοδοτημένος.
απαιτείται Κανονικό όνομα, επίσης αποδεκτό

Έξοδος

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/grok-imagine-image",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 20,
    "usd": "0.02",
    "charged": 20,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "revised_prompt": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Τα αρχεία σας, η επιλογή σαςΚάθε outputs[].url είναι ένα αντίγραφο στην αποθήκευσή μας: διατηρείται για πάντα (χρέωση ανά GB-μήνα) ή 7 ημέρες δωρεάν, σύμφωνα με τη ρύθμιση του λογαριασμού σας ή ?storage=.
Ίδια μορφή σε κάθε μοντέλοtype, url, content_type, width, height και duration, τόσο για εικόνες όσο και για βίντεο και ήχο. Το output είναι το αντικείμενο αποτελέσματος του ίδιου του μοντέλου.
Πεδία εξόδου
images
array of object {url, content_type, file_name, file_size, width, height}URL που παραπέμπει στην παραγόμενη εικόνα.
revised_prompt
string | nullΕνισχυμένο prompt για παραγωγή εικόνας.

Περισσότερα μοντέλα: Κείμενο σε εικόνα

Για πράκτορες AI: αυτή η σελίδα σε Markdown βρίσκεται στη διεύθυνση https://doitong.com/el/developers/models/xai/grok-imagine-image.md. Όλα τα μοντέλα και οι οδηγοί: https://doitong.com/developers/llms.txt