Image-to-Image
Image-to-Image transforms an existing image based on a new text prompt or style input. The endpoint returns a ready-to-use modified image URL and a task ID to track processing status.
Endpoint for requesting ima2img inference
application/jsonPossible values: The main prompt for image generation
A beautiful sunset over mountainsElements to avoid in the generated image
blur, darkness, noiseSource image to edit. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.
The model to use for image editing. Available models can be retrieved via the GET /api/v1/client/models endpoint.
stable-diffusion-v1-5Guidance scale for the generation
7.5Number of inference steps
20Random seed for generation
42ID of the inference request.
Unauthorized user.
Unauthorized user.
POST /api/v1/client/img2img HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: multipart/form-data
Content-Length: 219
{
"prompt": "A beautiful sunset over mountains",
"negative_prompt": "blur, darkness, noise",
"image": "binary",
"model": "stable-diffusion-v1-5",
"loras": [
{
"name": "style_lora",
"weight": 0.75
}
],
"guidance": 7.5,
"steps": 20,
"seed": 42
}{
"data": {
"request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
}
}Endpoint for calculating price for img2img inference
application/jsonPossible values: The main prompt for image generation
A beautiful sunset over mountainsElements to avoid in the generated image
blur, darkness, noiseThe model to use for generation
stable-diffusion-v1-5Guidance scale for the generation
7.5Number of inference steps
20Random seed for generation
42Calculated price for text2img inference.
Unauthorized user.
Unauthorized user.
POST /api/v1/client/img2img/price-calculation HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: application/json
Content-Length: 202
{
"prompt": "A beautiful sunset over mountains",
"negative_prompt": "blur, darkness, noise",
"model": "stable-diffusion-v1-5",
"loras": [
{
"name": "style_lora",
"weight": 0.75
}
],
"guidance": 7.5,
"steps": 20,
"seed": 42
}{
"data": {
"price": 0.25
}
}Last updated