Reference

Image feedback & credit back

Submit thumbs up/down feedback on generated images and request credit back on failed generations — the same flow as the Pedra editor.

Submit thumbs up/down feedback on a generated image — the same vote you can cast in the Pedra editor. On a thumbs-down you can also request credit back: Pedra runs an automated quality check and, if the generation failed, refunds the credits it consumed.

Endpoint

POSThttps://app.pedra.ai/api/feedback

Identify the image with the imageUrl returned at generation time, or pass its imageId directly. Voting is free — it never costs credits.

curl -X POST https://app.pedra.ai/api/feedback \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "imageUrl": "https://img.pedra.ai/IMAGE_ID",
    "vote": "down",
    "comment": "The furniture is still visible",
    "creditBack": true
  }'

Request fields

  • apiKey — your API key. Required.
  • imageUrl or imageId — the image to vote on. Use the URL returned by the generation endpoint, or the bare id. One is required.
  • vote"up" or "down". Send an empty string to clear a previous vote.
  • comment — optional free-text note explaining the vote. Helps the credit-back check and our quality monitoring.
  • creditBack — set to true on a down vote to request a refund of the credits this image consumed. Ignored on an up vote.

Credit back eligibility

When creditBack is requested, Pedra runs an automated quality check on the result. Credits are refunded only when all of the following hold:

  • The generation is an eligible type: empty room, remove object, edit via prompt, renovation, or furnish/home staging.
  • The request is made within 2 hours of generating the image.
  • It is not a high-creativity renovation (those are designed to alter the room drastically, so they are not eligible).

Response

Returns 200. A plain vote echoes the recorded vote; a credit-back request also returns a creditBack object with the outcome:

JSON
{
  "ok": true,
  "vote": "positive"
}

Response fields

  • vote — the recorded vote (positive, negative, or null if cleared).
  • creditBack.statusapproved, rejected, or ineligible. creditBack.creditsRefunded is the number of credits returned (0 unless approved), and creditBack.reason explains the decision.