Skip to content

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.

Authentication: API key (Authorization: Bearer rmk_...). Operation id createUpload.

Example

Terminal window
# The photo itself as the body
curl -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 fetch
curl -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"}'

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

FieldTypeDescription
urlrequiredstringA public https URL of a JPEG, PNG, WebP or HEIC photo (port 443, at most 3 redirects, 20 seconds).
Example body
{
"url": "https://example.com/listings/4471/living-room.jpg"
}

Responses

201 Stored

Returns Asset.

201 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
}
}
}

Every answer carries RateLimit-Limit, RateLimit-Remaining and X-Request-Id. See rate limits and errors. API version 1.2.0.