AI image
Theparamsobject is model-specific: pass the parameters defined by the schema of themodel_idyou choose. Call List AI tools & models to see the available models and the parameters each one accepts.
Generate an image
POST
/v1/ai/generate-image Enqueue a job to generate an image from a text prompt, or edit an existing image.
Request
curl -X POST "https://api.rendley.com/v1/ai/generate-image" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/ai/generate-image", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/ai/generate-image",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
model_id | string | Optional | |
params | object | Optional | |
project_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
Calculate image generation cost
POST
/v1/ai/generate-image/cost Calculate the credit cost of generating or editing an image.
Request
curl -X POST "https://api.rendley.com/v1/ai/generate-image/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/ai/generate-image/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/ai/generate-image/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
model_id | string | Optional | |
params | object | Optional | |
project_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
Remove image background
POST
/v1/ai/remove-image-background Enqueue a job to remove the background from an image, leaving only the foreground subject.
Request
curl -X POST "https://api.rendley.com/v1/ai/remove-image-background" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/ai/remove-image-background", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/ai/remove-image-background",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
clip_id | string | Optional | |
file_url | string | Optional | |
model_id | string | Optional | |
params | object | Optional | |
project_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
Calculate remove image background cost
POST
/v1/ai/remove-image-background/cost Calculate the credit cost of removing the background from an image.
Request
curl -X POST "https://api.rendley.com/v1/ai/remove-image-background/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/ai/remove-image-background/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/ai/remove-image-background/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
clip_id | string | Optional | |
file_url | string | Optional | |
model_id | string | Optional | |
params | object | Optional | |
project_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
Upscale an image
POST
/v1/ai/upscale-image Enqueue a job to upscale an existing image to higher resolution using AI super-resolution.
Request
curl -X POST "https://api.rendley.com/v1/ai/upscale-image" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/ai/upscale-image", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/ai/upscale-image",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
clip_id | string | Optional | |
file_url | string | Optional | |
model_id | string | Optional | |
params | object | Optional | |
project_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
Calculate image upscale cost
POST
/v1/ai/upscale-image/cost Calculate the credit cost of upscaling an image to higher resolution.
Request
curl -X POST "https://api.rendley.com/v1/ai/upscale-image/cost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "<project_id>"
}' const res = await fetch("https://api.rendley.com/v1/ai/upscale-image/cost", {
method: "POST",
headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"project_id": "<project_id>"
}),
});
const { data } = await res.json(); import requests
res = requests.post(
"https://api.rendley.com/v1/ai/upscale-image/cost",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"project_id": "<project_id>"
},
)
data = res.json()["data"] Request body
| Name | Type | Required | Description |
|---|---|---|---|
clip_id | string | Optional | |
file_url | string | Optional | |
model_id | string | Optional | |
params | object | Optional | |
project_id | string | Required |
Response codes
| Status | Description |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |