flux-realism

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

  • flux-realism

Model Overview

A state-of-the-art model designed to generate photorealistic images from textual descriptions. It allows users to create lifelike visuals without the need for extensive realism-related prompts.

Model
Generated image properties

flux-realism

Format: JPEG/PNG Min size: 512x512 Max size: 1536x1536 Default size: 1024x768 For both height and width, the value must be a multiple of 32.

Setup your API Key

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

Submit a request

API Schema

Quick Example

Let's generate an image of the specified size using a simple prompt.

import requests


def main():
    response = requests.post(
        "https://api.apilaplas.com/v1/images/generations",
        headers={
            # Insert your LAPLAS API Key instead of <YOUR_LAPLASAPI_KEY>:
            "Authorization": "Bearer <YOUR_LAPLASAPI_KEY>",
            "Content-Type": "application/json",
        },
        json={
            "prompt": "Epic battle of spaceships",
            "model": "flux-realism",
            'image_size': {
                "width": 1472,
                "height": 512
            }
        }
    )

    response.raise_for_status()
    data = response.json()

    print("Generation:", data)


if __name__ == "__main__":
    main()
Response
Generation: {'images': [{'url': 'https://cdn.apilaplas.com/eagle/files/elephant/nUJYdUrH6sLhgw2K2Z3hR_91336d262dc64dce8644c7c6f5adb11b.jpg', 'width': 1472, 'height': 512, 'content_type': 'image/jpeg'}], 'timings': {'inference': 5.585701048956253}, 'seed': 3110284405, 'has_nsfw_concepts': [False], 'prompt': 'Epic battle of spaceships'}

We obtained the following 1472x512 image by running this code example:

Last updated