Sketch-to-image generation via Stability AI, pay-per-call over MPP/Tempo.
What it does
This endpoint converts sketch or line-art images into fully rendered images using Stability AI's Sketch model, exposed through the Locus MPP (Micropayment Protocol) gateway. You POST a sketch image along with a text prompt describing the desired output, and receive a generated image. The control_strength parameter (0–1, default 0.7) governs how closely the output adheres to the input sketch. Output formats include JPEG, PNG, and WEBP. Payment is settled per-call via the Tempo method on pathUSD at $0.057 per request.
The Sketch endpoint is one of over 20 Stability AI capabilities available through this MPP gateway, which also includes text-to-image generation (Ultra, Core, SD3.5 variants), image editing (erase, inpaint, outpaint, search-and-replace, search-and-recolor), background removal and replacement with relighting, upscaling (fast, conservative, creative), style transfer, structure-guided generation, image-to-3D (Stable Fast 3D, Stable Point Aware 3D), and audio generation/editing (text-to-audio, audio-to-audio, audio inpaint). Each endpoint has its own per-call price.
The endpoint accepts POST requests with a JSON body. Required fields are `image` (the sketch/line-art input) and `prompt` (target description). Optional fields include `negative_prompt`, `control_strength`, `output_format`, and `seed`. The MPP challenge was not returned on HEAD/GET probes (404), which is expected since this is a POST-only endpoint. The OpenAPI spec confirms the 402 payment flow is configured for this path.
Capabilities
Use cases
- —Converting rough sketches or wireframes into polished illustrations
- —Turning hand-drawn concept art into photorealistic or stylized renders
- —Rapid prototyping of visual designs from quick line drawings
- —Generating product mockups from simple sketches
- —Creating game or animation assets from artist line art
Fit
Best for
- —Agents or apps that need to convert user-drawn sketches into finished images on demand
- —Workflows requiring pay-per-use image generation without API key management
- —Developers wanting Stability AI access via a standardized micropayment protocol
- —Creative tools that accept freehand input and produce refined visual output
Not for
- —Pure text-to-image generation with no sketch input (use the generate-ultra or generate-core endpoints instead)
- —High-volume batch processing where per-call pricing may be costly compared to subscription plans
- —Use cases requiring real-time streaming or sub-second latency
Quick start
curl -X POST https://stability-ai.mpp.paywithlocus.com/stability-ai/sketch \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <MPP_TOKEN>" \
-d '{
"image": "<base64-encoded-sketch>",
"prompt": "a cozy cabin in the mountains, digital painting",
"control_strength": 0.7,
"output_format": "png"
}'Example
Request
{
"seed": 42,
"image": "<base64-encoded-sketch-image>",
"prompt": "a cozy cabin in the mountains, digital painting",
"output_format": "png",
"negative_prompt": "blurry, low quality",
"control_strength": 0.7
}Endpoint
Quality
Full OpenAPI schema with request body details and pricing is available. However, the probe did not capture a live 402 challenge (the endpoint is POST-only and was probed with HEAD/GET), no response schema or example response is documented, and crawled pages returned only 404 JSON errors. Pricing is clear from the spec. Docking points for missing response format documentation and no live 402 confirmation.
Warnings
- —MPP probe returned 404 on HEAD and GET — endpoint is POST-only; live 402 status not directly confirmed
- —No response schema documented — output image format/encoding is not specified in the OpenAPI spec
- —Currency address 0x20c000000000000000000000b9537d11c60e8b50 assumed to be pathUSD with 6 decimals based on Tempo convention; not independently verified
Citations
- —Sketch endpoint charges 57000 base units via Tempo method with currency 0x20c000000000000000000000b9537d11c60e8b50https://stability-ai.mpp.paywithlocus.com
- —Required fields are image and prompt; optional fields include control_strength (default 0.7), negative_prompt, output_format, seedhttps://stability-ai.mpp.paywithlocus.com
- —API reference available at platform.stability.aihttps://platform.stability.ai/docs/api-reference
- —LLM-friendly docs available at beta.paywithlocus.com/mpp/stability-ai.mdhttps://beta.paywithlocus.com/mpp/stability-ai.md