---
title: "Create a quote"
method: POST
path: "/quotes"
tags: ["Quotes"]
---

# Create a quote

`POST /quotes`

## Request

- Base URL: `https://api.propertypixel.app/v1`
- URL: `https://api.propertypixel.app/v1/quotes`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://llflgtovnkrsjqydycyu.supabase.co/auth/v1/oauth/authorize`, token URL `https://llflgtovnkrsjqydycyu.supabase.co/auth/v1/oauth/token`)

Price a spending request without running it. Pass the returned id as quote_id to the operation within 10 minutes.

Requires a connection with edit access.

## Headers

- `Idempotency-Key` string: A unique key (for example a UUID) that makes retries safe. A retry with the same key and body returns the stored response; the same key with a different body returns 422. Keys last 24 hours.

## Request body

- object
  - `operation` 'enhance_photos' | 'stage_photos' | 'apply_recommendations' | 'create_video', required: The spending operation to price.
  - `input` object, required: The exact body you will send to that operation.

## Response `201`

Create a quote

- Quote
  - `object` 'quote', required
  - `id` string, uuid, required
  - `operation` string, required: The operation this quote prices, e.g. enhance_photos.
  - `credits` integer, required: Total credits the request will spend.
  - `balance` object, required
    - `available` integer, required
    - `after` integer, required
  - `sufficient` boolean, required: False when the balance can't cover the request.
  - `description` string, required
  - `lines` object[], required
    - `label` string, required
    - `quantity` integer, required
    - `unit_credits` integer, required
  - `watermarked` boolean, required: True for trial accounts: results carry a watermark.
  - `expires_at` string, date-time, required
  - `manage_credits_url` string, nullable, required: Where to add credits. Null inside ChatGPT.
  - `confirm_instructions` string, required

## Other responses

- `400`: The request is invalid. Codes: `validation_failed`.
- `401`: Missing, invalid or revoked credential. Codes: `unauthorized`.
- `403`: The credential can't do this. View-only connections get forbidden_scope on writes. Codes: `forbidden_scope`, `forbidden`.
- `404`: The resource doesn't exist in this workspace. Codes: `not_found`.
- `409`: The request conflicts with the current state. Codes: `conflict`, `idempotency_in_progress`.
- `422`: An Idempotency-Key was reused with a different body, or an upload was rejected. Codes: `idempotency_conflict`, `upload_rejected`.
- `429`: Too many requests for this connection. Codes: `rate_limited`.
- `500`: Something failed on our side. Retry later. Codes: `internal`.

---

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