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:

  • furnish, empty, renovation, editViaPrompt, remove — see Virtual staging.
  • enhance, enhanceAndCorrectPerspective, sky, blur — see Image enhancement.
  • createVideo, updateVideo, generateVoiceScript, generateVoice, musicLibrary, plus credits and feedback — see Video and Credits.
  • listProperties, listPropertyImages, createProperty, addImagesToProperty — see Properties.

Python uses snake_case (edit_via_prompt, create_video, update_video, generate_voice, music_library); 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.

Frequently asked questions

Does Pedra have an SDK?

Yes. Pedra has official, open-source SDKs for Python (pip install pedra) and Node.js/TypeScript (npm install @pedra-ai/sdk). Both have zero runtime dependencies and wrap every API endpoint.

Does Pedra have a Python SDK?

Yes. Install it with pip install pedra (PyPI package pedra), Python 3.8+, then import it with: from pedra import Pedra. It covers every endpoint.

Does Pedra have a Node.js or JavaScript SDK?

Yes. Install it with npm install @pedra-ai/sdk, Node 18+, with TypeScript types included: import Pedra from @pedra-ai/sdk.

How do I authenticate the Pedra SDK?

Pass your key to the client constructor, or set the PEDRA_API_KEY environment variable. Get a key at app.pedra.ai under Settings → API, and call from your backend.

Are the Pedra SDKs free and open source?

Yes. Both SDKs are MIT-licensed and open source on GitHub (pedra-ai/pedra-python and pedra-ai/pedra-node). You only pay for API usage.

Do the Pedra SDKs require polling?

No. Each method blocks until the asset is ready and returns the final URL(s), so there are no job IDs to poll.