Lumina AIModel guides

Grok Imagine Image 2.0 text-to-image API integration

Photograph a tea tin for a product page with grok-imagine-image-2.0/text-to-image. Prepare the assets, submit the request and check the result.

Photograph a tea tin for a product page

Decide where the image will appear before composing the prompt. Check both the full image and a thumbnail cropped to the product grid. The lid, the base and the shadow should still fit, with enough clear space for the page title.

Production settings

For a quality comparison, hold framing and delivery size constant while changing quality. Compare fine lettering, texture and colour banding at the size the images will occupy on the final page.

Submit the task

Set LUMINA_API_KEY on the server to an API key that can call this model.

curl -sS -X POST 'https://luminaai.cloud/lumina/v1/images/generations' \
  -H "Authorization: Bearer $LUMINA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @- <<'JSON'
{
  "model": "grok-imagine-image-2.0/text-to-image",
  "prompt": "A matte teal tea tin on a pale grey table, photographed at label height. Soft window light from the left, the entire tin in frame and clear space on the right for copy."
}
JSON

Fields for this request

FieldType, limits or values
promptdefault "A collage of London landmarks in a stenciled street-art style."
resolution1k / 2k · default "1k"
qualitylow / medium · default "medium"
num_images1 / 2 / 3 / 4 · default 1

Retrieve the result

Save the id from the submission response. Replace TASK_ID below with that value and use the same key. If the status is IN_PROGRESS, poll this task again.

curl -sS 'https://luminaai.cloud/lumina/v1/tasks/TASK_ID' \
  -H "Authorization: Bearer $LUMINA_API_KEY"

Read the generated files when the task reaches SUCCESS. If it returns FAILURE, retain the task ID and error so you can trace the exact inputs and model used.