Generate images from text prompts via xAI's Grok models, paid per-call over MPP/Tempo.
What it does
This endpoint provides text-to-image generation powered by xAI's Grok image models, accessible through the Locus MPP (Micropayment Protocol) gateway. It accepts a text prompt and returns one or more generated images as URLs or base64-encoded data. Two model tiers are available: 'grok-imagine-image' (default) and 'grok-imagine-image-pro'. You can control the number of images generated, the aspect ratio (1:1, 16:9, 9:16, 4:3, 3:2, or auto), and the response format.
Payment is handled via the MPP charge intent settled on Tempo L2, with pricing listed at $0.02–$0.08 per image depending on the model selected. The endpoint is part of a broader Grok service suite hosted at grok.mpp.paywithlocus.com that also offers chat completions, web/X search, code execution, image editing, and text-to-speech — each on its own path.
Note: The probe did not capture a live 402 challenge on HEAD/GET for this specific path (it returned 404), which is expected since the endpoint only accepts POST requests. The OpenAPI spec is well-defined with a clear request schema, and the service root directs callers to skill.md and llms.txt documentation at paywithlocus.com for integration guidance.
Capabilities
Use cases
- —Generating illustrations or concept art from text descriptions
- —Creating social media visuals on demand via agent workflows
- —Producing multiple image variants at different aspect ratios for responsive layouts
- —Programmatic image creation in automated content pipelines
Fit
Best for
- —AI agents needing pay-per-call image generation without API key management
- —Developers wanting xAI Grok image models via a micropayment gateway
- —Workflows requiring multiple aspect ratio options (1:1, 16:9, 9:16, etc.)
Not for
- —Image editing or inpainting (use the sibling /grok/image-edit endpoint instead)
- —High-volume batch generation where subscription pricing would be cheaper
- —Use cases requiring fine-tuned or custom image models
Quick start
curl -X POST https://grok.mpp.paywithlocus.com/grok/image-generate \
-H "Content-Type: application/json" \
-d '{
"prompt": "A futuristic city skyline at sunset, digital art",
"model": "grok-imagine-image",
"n": 1,
"aspect_ratio": "16:9",
"response_format": "url"
}'Example
Request
{
"n": 1,
"model": "grok-imagine-image",
"prompt": "A futuristic city skyline at sunset, digital art",
"aspect_ratio": "16:9",
"response_format": "url"
}Endpoint
Quality
The OpenAPI spec provides a clear request schema, model options, pricing description, and parameter documentation. However, no live 402 challenge was captured for this POST-only endpoint, no response schema or example response is documented, and all crawled pages returned 404 (expected for non-endpoint paths). Pricing is described but not machine-verifiable from a captured challenge.
Warnings
- —Probe returned 404 on HEAD/GET — endpoint likely POST-only; no live 402 challenge was captured to confirm liveness
- —No response schema documented in the OpenAPI spec; response format is inferred from the response_format parameter
- —Pricing ($0.02–$0.08 per image) comes from the OpenAPI x-payment-info description only, not from a captured payment challenge
Citations
- —Two image models available: grok-imagine-image (default) and grok-imagine-image-prohttps://grok.mpp.paywithlocus.com
- —Pricing is $0.02–$0.08 per imagehttps://grok.mpp.paywithlocus.com
- —Supported aspect ratios: 1:1, 16:9, 9:16, 4:3, 3:2, autohttps://grok.mpp.paywithlocus.com
- —Payment settled via Tempo L2 with charge intenthttps://grok.mpp.paywithlocus.com
- —Service docs available at paywithlocus.com/skill.md and paywithlocus.com/llms.txthttps://grok.mpp.paywithlocus.com