reve/remix-edit-image

This documentation is valid for the following list of our models:

  • reve/remix-edit-image

Model Overview

The model takes multiple images as input, with the prompt defining how they are used or combined.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

API Schema

post
Authorizations
Body
modelundefined · enumRequiredPossible values:
image_urlsstring · uri[] · min: 1 · max: 4Required

List of URLs or local Base64 encoded images to edit.

aspect_ratiostring · enumOptional

The aspect ratio of the generated image.

Default: 3:2Possible values:
promptstring · max: 2560Required

The text prompt describing the content, style, or composition of the image to be generated.

convert_base64_to_urlbooleanOptional

If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format.

Default: true
output_formatstring · enumOptional

The format of the generated image.

Default: jsonPossible values:
Responses
201

Successfully generated image

application/json
post
async function main() {
  const response = await fetch('https://api.aimlapi.com/v1/images/generations', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model: 'reve/remix-edit-image',
      prompt: "Add a crown to the T-rex's head.",
      image_urls: ['https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png'],
    }),
  });

  const data = await response.json();
  console.log(JSON.stringify(data, null, 2));
}

main();
201

Successfully generated image

{
  "data": [
    {
      "url": "text",
      "b64_json": "text"
    }
  ]
}

Quick Example

Let's generate a new image using the one from the flux/dev Quick Example as a reference — and make a simple change to it with a prompt.

import requests
import json  # for getting a structured output with indentation

def main():
    response = requests.post(
        "https://api.aimlapi.com/v1/images/generations",
        headers={
            # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
            "Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
            "Content-Type": "application/json",
        },
        json={
            "model": "reve/remix-edit-image",
            "prompt": "Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.",
            "image_urls": [
                "https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png",
                "https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg"
            ]
        }
    )

    data = response.json()
    print(json.dumps(data, indent=2, ensure_ascii=False))

if __name__ == "__main__":
    main()
Response
{
  "data": [
    {
      "url": "https://cdn.aimlapi.com/generations/phoenix/1759284458418-4d0b832c-3f40-47e3-84bd-f56ca78c3b0e.png",
      "b64_json": null,
      "request_id": "rsid-17c1ade740057a36b9711c72bbf4d63f",
      "content_violation": false
    }
  ],
  "meta": {
    "usage": {
      "tokens_used": 210000
    }
  }
}
Reference Images
Generated Image
Image #1
"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect."
Image #2

Last updated

Was this helpful?