Recolor specific objects in an image by text prompt via Stability AI's Search and Recolor endpoint.
What it does
This MPP endpoint exposes Stability AI's Search and Recolor capability through the Locus payment proxy. You provide a source image, a `select_prompt` describing the object to target, and a `prompt` describing the desired new color or appearance. The service automatically detects the specified object and recolors it while preserving the rest of the image. Payment is settled per-call via the Tempo L2 protocol at $0.057 per request (57,000 base units of pathUSD with 6 decimals).
The endpoint accepts POST requests with a JSON body. Required fields are `image` (the source image), `prompt` (the new color/appearance), and `select_prompt` (what object to find and recolor). Optional parameters include `negative_prompt` to exclude unwanted results, `output_format` (jpeg, png, or webp), and a `seed` for reproducibility. The response contains the recolored image. For async operations, a separate `/stability-ai/result` endpoint can be polled with the returned generation ID at no additional cost.
This endpoint is part of a broader Stability AI suite available through the same Locus MPP gateway, which includes image generation (Ultra, Core, SD3), editing (erase, inpaint, outpaint, search-and-replace), upscaling, background removal, style transfer, 3D model generation, and audio generation. All endpoints use the same Tempo-based payment mechanism. The OpenAPI spec is well-defined with full request schemas, though response schemas are not documented beyond a generic 200 success indicator.
Capabilities
Use cases
- —Automatically recolor a product (e.g., change a red car to blue) in e-commerce photography
- —Adjust object colors in marketing materials without manual masking
- —Batch-recolor branded items in images for A/B testing different color schemes
- —Integrate selective recoloring into an automated image processing pipeline
- —Allow end-users to interactively change object colors in a design tool
Fit
Best for
- —Agents or apps that need programmatic, text-guided object recoloring without manual masks
- —Workflows requiring pay-per-call image editing with no subscription commitment
- —Developers integrating Stability AI editing features via a crypto-settled payment proxy
Not for
- —Full image generation from scratch (use the generate-ultra or generate-core endpoints instead)
- —Tasks requiring fine-grained pixel-level mask control (this uses automatic object detection from a text prompt)
- —High-volume batch processing where subscription-based Stability AI API access may be more cost-effective
Quick start
curl -X POST https://stability-ai.mpp.paywithlocus.com/stability-ai/search-and-recolor \
-H "Content-Type: application/json" \
-d '{
"image": "<base64-or-url-of-source-image>",
"prompt": "bright blue",
"select_prompt": "the car"
}'Example
Request
{
"seed": 42,
"image": "<base64-encoded-image-or-url>",
"prompt": "bright blue",
"output_format": "png",
"select_prompt": "the car",
"negative_prompt": "dull, faded"
}Endpoint
Quality
The OpenAPI spec provides a complete request schema with clear field descriptions and pricing info. However, the probe did not capture a live 402 challenge on HEAD/GET (the endpoint is POST-only, so this is expected), response schema details are absent, and no crawled documentation pages returned useful content. Pricing is derivable from the spec.
Warnings
- —Probe returned 404 on HEAD and GET — endpoint is POST-only; this does not indicate it is down, but live 402 challenge was not directly captured for this specific path.
- —Response schema is not documented beyond '200: Successful response' — actual response format (base64 image, URL, async ID) is unknown from available material.
- —Currency address 0x20c000000000000000000000b9537d11c60e8b50 is assumed to be pathUSD with 6 decimals based on the broader Locus/Tempo convention; this is not explicitly confirmed in the spec.
Citations
- —Search and Recolor endpoint costs 57,000 base units per call via Tempo settlementhttps://stability-ai.mpp.paywithlocus.com
- —Required fields are image, prompt, and select_prompthttps://stability-ai.mpp.paywithlocus.com
- —Optional parameters include negative_prompt, output_format, and seedhttps://stability-ai.mpp.paywithlocus.com
- —The /stability-ai/result endpoint can be polled at zero cost for async resultshttps://stability-ai.mpp.paywithlocus.com
- —API reference available at platform.stability.aihttps://platform.stability.ai/docs/api-reference