---
title: "Vote on a generated image and optionally request credit back"
method: POST
path: "/api/feedback"
tags: ["Account"]
---

# Vote on a generated image and optionally request credit back

`POST /api/feedback`

## Request

- Base URL: `https://app.pedra.ai`
- URL: `https://app.pedra.ai/api/feedback`
- Auth: none required

Submits a thumbs up/down on a previously generated image and, on a down vote, can request a credit refund for eligible generations. Free — voting never costs credits. Credit back is eligible only for empty_room, remove_object, edit_via_prompt, renovation, and (non-high-creativity) furnish generations requested within 2 hours.

## Request body

- object: Provide either `imageUrl` or `imageId` to identify the generation.
  - `apiKey` string, required: Account API key, sent in the request body. Get one at https://app.pedra.ai under Settings → API.
  - `imageUrl` string: URL of the generated image (as returned by a generation endpoint). Provide this or `imageId`.
  - `imageId` string: Bare id of the generated image. Provide this or `imageUrl`.
  - `vote` 'up' | 'down' | '', required: "up" or "down". An empty string clears a previous vote.
  - `comment` string: Optional free-text explanation of the vote.
  - `creditBack` boolean: On a down vote, request a credit refund for the generation if eligible.

## Response `200`

Vote recorded. Includes a `creditBack` object only when a refund was requested.

- FeedbackResult
  - `ok` boolean
  - `vote` string, nullable: Recorded vote: "positive", "negative", or null when cleared.
  - `creditBack` object: Present only when a credit refund was requested.
    - `status` 'approved' | 'rejected' | 'ineligible'
    - `creditsRefunded` integer
    - `reason` string

## Other responses

- `400`: Invalid request — bad or unreachable image URL, missing required field, or validation error.
- `404`: Missing, invalid, or revoked API key.
- `405`: Wrong HTTP method — all endpoints accept POST (credits also accepts GET).

---

[API](https://skmtc.dev/pedra/apis/pedra-api.md) · [All operations](https://skmtc.dev/pedra/apis/pedra-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pedra/apis/pedra-api/revisions/87b2e76912c8?raw)
