Upload a photo
POST https://api.remodeled.ai/public/v1/uploads
Send the photo itself as the body with its Content-Type, or JSON {"url": "https://..."} to have it fetched. Up to 25 MB and 20,000 px a side. Per key: 20 uploads a minute, 200 an hour, 1,000 a day; every attempt counts, including refused ones.
Example
# The photo itself as the bodycurl -X POST https://api.remodeled.ai/public/v1/uploads \ -H "Authorization: Bearer $REMODELED_API_KEY" \ -H "Content-Type: image/jpeg" \ --data-binary @living-room.jpg
# Or a public URL to fetchcurl -X POST https://api.remodeled.ai/public/v1/uploads \ -H "Authorization: Bearer $REMODELED_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/listings/4471/living-room.jpg"}'import Remodeled from 'remodeled-ai';
const client = new Remodeled(); // reads REMODELED_API_KEY
// A path (Node, Bun, Deno), bytes, or a Blob or Fileconst photo = await client.uploads.create('./living-room.jpg');
// Or a public URLconst fetched = await client.uploads.fromUrl('https://example.com/listings/4471/living-room.jpg');from remodeled import Remodeled
client = Remodeled() # reads REMODELED_API_KEY
# A path, bytes, or an open binary filephoto = client.uploads.create("living-room.jpg")
# Or a public URLfetched = client.uploads.from_url("https://example.com/listings/4471/living-room.jpg")Try it
Try it with your key
Request body
One of: image/jpeg, image/png, image/webp, image/heic, image/heif, application/json.
To send the photo itself, make the body its bytes, with a Content-Type that matches them:
JPEG, PNG, WebP or HEIC, up to 25 MB and 20,000 pixels a side. To have us fetch it instead, send JSON:
Schema: UploadFromUrl
| Field | Type | Description |
|---|---|---|
urlrequired | string | A public https URL of a JPEG, PNG, WebP or HEIC photo (port 443, at most 3 redirects, 20 seconds). |
{ "url": "https://example.com/listings/4471/living-room.jpg"}Responses
201 Stored
Returns Asset.
{ "id": "01a1ebfd-494e-752c-86b5-d58f61313030", "url": "https://cdn.remodeled.ai/upload/01a1ebfd-492a-71c8/01a1ebfd-494e-752c-86b5-d58f61313030.jpg", "contentType": "image/jpeg", "width": 1600, "height": 1200}400 empty_upload, upload_too_large, upload_wrong_type or upload_unreadable
An error.
{ "error": { "code": "key_limit_reached", "message": "This key may spend 500 credits in 30 days and has used 498. Raise its limit in Account, API keys.", "details": { "limit": 500, "used": 498, "cost": 5 } }}401 invalid_api_key: missing, wrong or revoked key
An error.
{ "error": { "code": "invalid_api_key", "message": "Missing or invalid API key. Send it as Authorization: Bearer rmk_..." }}415 unsupported_type
An error.
{ "error": { "code": "key_limit_reached", "message": "This key may spend 500 credits in 30 days and has used 498. Raise its limit in Account, API keys.", "details": { "limit": 500, "used": 498, "cost": 5 } }}422 url_unreachable, or an invalid url
An error.
{ "error": { "code": "key_limit_reached", "message": "This key may spend 500 credits in 30 days and has used 498. Raise its limit in Account, API keys.", "details": { "limit": 500, "used": 498, "cost": 5 } }}429 rate_limited (wait Retry-After seconds) or too_many_active
An error.
{ "error": { "code": "key_limit_reached", "message": "This key may spend 500 credits in 30 days and has used 498. Raise its limit in Account, API keys.", "details": { "limit": 500, "used": 498, "cost": 5 } }}