Lompat ke konten

Grok Imagine Image

Integrasikan

ID model 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"

Permintaan ini: $0,02 20 kredit API Jalankan di halaman ini

Dapatkan kunci API
xAI Teks ke Gambar hingga 2k #xai#grok#text-to-image

Text-to-image Grok dengan 13 rasio aspek dari 2:1 hingga 1:2 dan resolusi 1k atau 2k

Dibuat di Doitong

Karya publik yang dibuat dengan Grok Imagine Image oleh komunitas Doitong. Gunakan kembali prompt dengan satu klik.

Karya publik yang ditampilkan: 10
Art style: Cinematic Realistic. Вертикальный формат 9:16. Детальный макро-план в салоне автомобил...

Art style: Cinematic Realistic. Вертикальный формат 9:16. Детальный макро-план в салоне автомобиля: палец нажимает матовую кнопку запуска двигателя, на приборной панели вспыхивают циферблаты со спортивными стрелками. Мягкая подсветка интерьера в теплых янтарных и белых тонах, фактурная кожаная...

Art style: Cute 3D. Капибара. A plump, highly relaxed capybara sitting partially submerged in a s...

Art style: Cute 3D. Капибара. A plump, highly relaxed capybara sitting partially submerged in a steaming hot spring, positioned in the lower center of the vertical frame. On the very top of its head sits a bright orange mandarin orange, perfectly balanced. The capybara has half-closed eyes, a...

Cinematic head-and-shoulders portrait, face close-up, sharp eyes in crisp focus, shallow depth of...

Cinematic head-and-shoulders portrait, face close-up, sharp eyes in crisp focus, shallow depth of field, soft key light with gentle rim light, filmic colour grading. The character looks slightly past the camera with a natural, expressive gaze. Neutral, softly blurred background. No text, no...

Pixar-style 3D animation, soft warm cinematic lighting, shallow depth of field. Огромное лесное д...

Pixar-style 3D animation, soft warm cinematic lighting, shallow depth of field. Огромное лесное дерево с массивным текстурным стволом и мягкими, гибкими ветвями, на коре дерева светятся два больших, теплых и дружелюбных глаза, 3D анимация в стиле Pixar, сказочный вид, высокая детализация коры,...

Art style: Felt / Fabric. Full-length view, the entire figure visible from head to feet, standing...

Art style: Felt / Fabric. Full-length view, the entire figure visible from head to feet, standing upright, figure centered with a professional restaurant kitchen filling the sides — gleaming steel counters, hanging copper pans and softly glowing pass lights. Arina is a young woman in her early...

Art style: photorealistic cinematic dark fantasy, IMAX anamorphic, heavy chiaroscuro, volumetric ...

Art style: photorealistic cinematic dark fantasy, IMAX anamorphic, heavy chiaroscuro, volumetric fog and storm sky, colossal obsidian dragon with glowing crimson magma veins across scales and wings, tiny human figure for epic scale, graphite/obsidian with crimson and ember-gold accents, drifting...

A traditional hand-drawn FILM STORYBOARD SHEET for scene 21: one page divided into a clean 3x3 gr...

A traditional hand-drawn FILM STORYBOARD SHEET for scene 21: one page divided into a clean 3x3 grid of NINE separate rectangular panels, three rows of three, each panel a 16:9 rectangle with a thin ruled black border and a small hand-written panel number in its top-left corner from 1 to 9. Thin...

A traditional hand-drawn FILM STORYBOARD SHEET for scene 9: one page divided into a clean 3x3 gri...

A traditional hand-drawn FILM STORYBOARD SHEET for scene 9: one page divided into a clean 3x3 grid of NINE separate rectangular panels, three rows of three, each panel a 16:9 rectangle with a thin ruled black border and a small hand-written panel number in its top-left corner from 1 to 9. Thin...

Buat permintaan

Kontrol dibuat dari skema model. Kode dan harga diperbarui saat Anda mengubahnya.

•wajib 88 / 8000

Deskripsi teks tentang gambar yang akan dibuat.

resolution bawaan 1k

Pilihan resolusi gambar antara standar (`1k`) dan tinggi (`2k`).

bawaan 1:1

Rasio lebar terhadap tinggi untuk gambar output.

num_images bawaan 1

Jumlah gambar yang dihasilkan.

Lanjutan output_format · enable_safety_checker
output_format bawaan jpeg

Format file untuk gambar hasil.

POST /run/xai/grok-imagine-image?wait=20 estimasi harga → $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"

Jalankan permintaan ini

Key Anda tetap berada di browser ini: key hanya dikirim ke Doitong API dan disimpan (localStorage) hanya jika Anda mencentang Ingat. Dapatkan kunci API

Tentang Grok Imagine Image

Menghasilkan hingga 4 gambar dari prompt hingga 8000 karakter. `aspect_ratio` menawarkan 13 opsi termasuk 16:9, 4:3, 1:1, 9:16, serta rasio ultra-lebar atau tinggi, dan `resolution` adalah 1k atau 2k. Output berupa jpeg, png, atau webp. Respons juga mengembalikan prompt revisi yang benar-benar digunakan.

Parameter

Kirim nama kanonis atau nama asli, bukan keduanya. Nama kanonis

NamaTipe BawaanDiizinkan Deskripsi
promptwajib
Tipestring
≤ 8.000 karakter
Deskripsi teks tentang gambar yang akan dibuat.
num_imagesopsional num_outputs
Tipeinteger
Bawaan1
1 – 4
Jumlah gambar yang dihasilkan.
aspect_ratioopsional
Tipeenum
Bawaan1:1
2:120:919.5:916:94:33:21:12:33:49:169:19.59:201:2
Rasio lebar terhadap tinggi untuk gambar output.
resolutionopsional
Tipeenum
Bawaan1k
1k2k
Pilihan resolusi gambar antara standar (`1k`) dan tinggi (`2k`).
output_formatopsional
Tipeenum
Bawaanjpeg
jpegpngwebp
Format file untuk gambar hasil.
enable_safety_checkeropsional
Tipeboolean
Bawaantrue
Penyaringan dapat dilonggarkan dengan menetapkan false, jika pemanggil berwenang.
wajib Nama kanonis, juga diterima

Output

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"
  }
}
File Anda, pilihan AndaSetiap outputs[].url adalah salinan di penyimpanan kami: disimpan selamanya (dikenai biaya per GB-bulan) atau 7 hari gratis, sesuai setelan akun atau ?storage=.
Struktur sama di setiap modeltype, url, content_type, width, height, dan duration, untuk gambar, video, dan audio. output adalah objek hasil milik model.
Field output
images
array of object {url, content_type, file_name, file_size, width, height}URL yang mengarah ke gambar yang dihasilkan.
revised_prompt
string | nullPrompt yang ditingkatkan untuk pembuatan gambar.

Model lainnya: Teks ke Gambar

Untuk agen AI: halaman ini dalam Markdown tersedia di https://doitong.com/id/developers/models/xai/grok-imagine-image.md. Semua model dan panduan: https://doitong.com/developers/llms.txt