Grok Imagine Image 2.0
Generate or edit one image from text and up to five public HTTPS reference images, with automatic edit-mode selection.
Supported modes
Async flow: Create the task, save data.id, then poll the Task with GET /v1/tasks/{task_id}. On succeeded, read data.output.media. On failed, read data.error_code and data.error_message, then follow the error and retry policy.
Using a local file? upload a local input first and pass the returned data.url.
認証
AuthorizationBearer
Send your API key as Authorization: Bearer <BEATAPI_API_KEY>.
ヘッダー
Idempotency-Key
リクエスト
This endpoint expects an object.
model
Must be grok-imagine-image-2.0.
prompt
Generation or image-editing instructions.
images
Public HTTPS reference-image URLs. Omit for text-to-image.
aspect_ratio
Output image aspect ratio. auto requires at least one image.
レスポンス
Image generation task accepted
エラー
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error

