{"uid":"cap_ewR0updgVP1GbYzZn43Rf","slug":"haven-image-edit-api-8ba17d52","name":"Haven Image Edit API","description":"Haven is a private AI agent for your home. Join the waitlist for h1 speaker updates and early app access.","url":"https://api.havenagent.ai/x402/api/v1/image/edit","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":2000,"minLength":1},"mediaType":{"enum":["image/png","image/jpeg"],"type":"string"},"imageBase64":{"type":"string","description":"base64 image bytes, no data-URI prefix"},"negativePrompt":{"type":"string"}}},"responseSchema":{"type":"json","example":{"kind":"image_edit","jobId":"00000000-0000-0000-0000-000000000000","status":"queued","resultUrl":"https://api.havenagent.ai/x402/api/v1/image/edit/jobs/00000000-0000-0000-0000-000000000000/result","statusUrl":"https://api.havenagent.ai/x402/api/v1/image/edit/jobs/00000000-0000-0000-0000-000000000000","etaSeconds":300,"pollBudgetSeconds":1200}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9aZMELFMW_kX7iqvf0mPU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Edits or modifies an existing image using a text prompt, returning a job ID and polling URL for the result","exampleAgentPrompt":"Take this image I'm uploading and edit it so the background becomes a sunny beach — output as PNG. Here's the image in base64: <base64data>","exampleUseCases":[{"title":"Home interior style swap","prompt":"I have a photo of my living room — can you edit it so the walls are painted a deep navy blue and the furniture looks modern Scandinavian? Output it as a PNG. Here's the base64 image."},{"title":"Product photo background removal","prompt":"Take this product photo in JPEG and edit out the messy warehouse background, replacing it with a clean white studio backdrop. Here's the base64 of the image."},{"title":"Portrait touch-up with negative prompt","prompt":"Edit this portrait so the lighting looks golden hour and warm, but make sure there's no blurriness or noise — use the negative prompt 'blurry, grainy, low quality'. Output as PNG. Here's the base64 image."}],"resultDescription":"Returns a JSON object containing a job ID (UUID), initial status ('queued'), a resultUrl to fetch the finished edited image, a statusUrl for polling job progress, estimated completion time in seconds (etaSeconds, typically up to 300s), and a pollBudgetSeconds indicating the maximum polling window (1200s). The agent must poll the statusUrl until the job completes, then fetch the image from resultUrl.","failureModes":["Invalid or malformed base64 image data causing a 400 error","Unsupported media type (anything other than image/png or image/jpeg)","Prompt exceeding 2000 characters causing validation failure","Payment failure via x402 protocol resulting in 402 response","Job timeout if result is not ready within pollBudgetSeconds (1200s)","Server-side generation failure leading to an error status on the job"],"whenToPreferThis":"Choose this endpoint when you need to modify an existing image using a natural language prompt rather than generating one from scratch. It is well-suited for tasks like style transfer, background replacement, inpainting, or content modification on a provided image. Prefer this over text-to-image generation endpoints when the user has a source image they want altered. It uses the x402 payment protocol (0.1 USDC per call), so it is appropriate in agent contexts where micropayments are supported.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:15.601Z","isFirstParty":false}