Getting started

SDKs

Official Python and JavaScript/TypeScript SDKs for the Pedra API. Virtual staging, renovation, image enhancement, and listing videos in a few lines of code — every method blocks until the asset is ready and returns the final URL.

Official SDKs

Two first-party clients wrap the Pedra REST API. Both are open source, have zero runtime dependencies, and expose every endpoint. Each method blocks until the asset is ready and returns the final URL(s) — no job IDs to poll.

Python
pedra
Python 3.8+ · zero dependencies
Node.js
@pedra-ai/sdk
Node.js 18+ · zero dependencies

Install

Node.js

npm install @pedra-ai/sdk

Python

pip install pedra

Authentication

Pass your key to the client, or set the PEDRA_API_KEY environment variable. Get a key by signing up at app.pedra.ai and opening Settings → API. Keys are long-lived — never ship them in client-side code; call from your backend. See Authentication for details.

from pedra import Pedra

# Reads PEDRA_API_KEY from the environment…
pedra = Pedra()

# …or pass the key explicitly
pedra = Pedra("YOUR_API_KEY")

Quickstart

Furnish an empty room. Every image method returns the same shape — read url for the first asset or urls for all of them.

from pedra import Pedra

pedra = Pedra()  # reads PEDRA_API_KEY

result = pedra.furnish(
    image_url="https://example.com/empty-living-room.jpg",
    room_type="Living room",
    style="Minimalist",
)

print(result.url)   # the staged image URL
print(result.urls)  # all generated URLs

What you can call

Both SDKs cover every Pedra endpoint with the same method names across languages:

Python uses snake_case (edit_via_prompt, create_video); the parameters and behavior are identical.

Error handling

Both SDKs throw PedraApiError for API failures (with status and body) and PedraError for client/network errors. See Errors & limits for the full list of failure modes.

MCP server

Prefer to drive Pedra from an AI assistant? The official Pedra MCP server exposes the same operations to Claude, ChatGPT, and Cursor, so you can stage and edit listing photos straight from a chat.

Source & support

Both SDKs are MIT-licensed and developed in the open. Star or open issues on GitHub, and email felix@pedra.ai for integration help, higher quotas, or enterprise terms.