{"uid":"cap_qypax7Jn6WRwO_v2vOK1z","slug":"withzero-grok-imagine-image-generation-58f6270b","name":"WithZero Grok Imagine Image Generation","description":"Generate images from a text prompt with xAI's Grok Imagine quality tier. Returns hosted image URLs.","url":"https://agents.withzero.xyz/api/v1/image/images/grok-imagine?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","example":{"count":1,"prompt":"A watercolor painting of a lighthouse at sunrise"},"required":["prompt","count"],"properties":{"count":{"type":"integer","default":1,"maximum":4,"minimum":1,"description":"How many images to generate (1–4)."},"prompt":{"type":"string","maxLength":4000,"minLength":1,"description":"Text description of the image to generate."}},"additionalProperties":false},"responseSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["images","model","price_usdc"],"properties":{"model":{"type":"string","description":"The model that produced the images."},"images":{"type":"array","items":{"type":"object","required":["url","mimeType","sizeBytes"],"properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"number"}},"additionalProperties":false},"description":"The generated images, as hosted URLs."},"price_usdc":{"type":"string","description":"The amount charged for this request, in USDC."}},"additionalProperties":false},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":3,"rating":{"score":"0.81","successRate":"0.82","reviews":3,"stars":"4.2","state":"rated"},"availabilityStatus":"healthy","priceObserved":{"p10Cents":"5.0000","medianCents":"5.0000","p90Cents":"5.0000","minCents":"5.0000","maxCents":"5.0000","p95Cents":"5.0000","sampleCount":35,"varies":false,"failureChargeRate":null},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6-WQ6bIan7WKH-6L85ouK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_Fx_1tWqq0U5G1WuYU4fvz","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates images from a text prompt using xAI's Grok Imagine model, returning hosted image URLs.","exampleAgentPrompt":"Generate 2 images of a futuristic Tokyo cityscape at night with neon reflections on wet streets using Grok Imagine.","exampleUseCases":null,"resultDescription":"Returns hosted image URLs for the generated images — between 1 and 4 depending on the count requested. Each URL points to a publicly accessible image generated by xAI's Grok Imagine model based on the provided text prompt.","failureModes":["Prompt too long (exceeds 4000 characters) — returns validation error","Count out of range (less than 1 or more than 4) — returns validation error","Model unavailable or overloaded — returns service error","Payment failure via x402 protocol — returns 402 Payment Required","Empty or missing prompt — returns validation error"],"whenToPreferThis":"Choose this endpoint when you need image generation specifically using xAI's Grok Imagine quality tier and want hosted URLs returned directly. Prefer this over other generators when Grok Imagine's specific aesthetic or quality characteristics are desired, or when you need up to 4 image variations from a single prompt in one call.","instructions":null,"reviewSummary":"WithZero generates images from text prompts using xAI's Grok Imagine tier, returning hosted JPEG URLs at $0.05 per image with ~13s latency. Prompt adherence is solid — including spatial layout instructions like compositional framing — and output quality is consistently rated good for the price point. Fixed output at 1280×720 with no aspect ratio or size controls, and file-based request formatting is required (inline input fails).","reviewSummaryHighlights":["Strong prompt adherence including spatial/compositional instructions","Good image quality at $0.05 per generation","Returns valid hosted JPEG URLs reliably"],"reviewSummaryConcerns":["No aspect ratio or image size control — fixed 1280×720 output","Inline request input fails; file-based input required"],"reviewSummaryGeneratedAt":"2026-10-30T02:15:15.092Z","activationCount":154,"lastUsedAt":"2026-10-29T23:33:47.423Z","lastSuccessfullyRanAt":"2026-10-29T23:33:47.423Z","lastHealthCheckAt":"2026-10-31T05:56:03.237Z","isFirstParty":true,"canonicalSlug":"withzero-grok-imagine-image-generation-58f6270b"}