POST
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/sd1.5-cyberrealistic" # Request payload data = { "prompt": "Photo of a burger with cheese from food photograph, food photography, photorealistic, ultra realistic, maximum detail, foreground focus, recipes.com, epicurious, instagram, 8k, volumetric light, cinematic, octane render, uplight, no blur, depth of field, dof, bokeh, 8k", "negative_prompt": "CyberRealistic_Negative", "scheduler": "dpmpp_2m", "num_inference_steps": 25, "guidance_scale": 7.5, "samples": 1, "seed": 945216760, "img_width": 512, "img_height": 768, "base64": False } headers = {'x-api-key': api_key} response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Prompt to render


negative_promptstr ( default: None )

Prompts to exclude, eg. 'bad anatomy, bad hands, missing fingers'


schedulerenum:str ( default: UniPC )

Type of scheduler.

Allowed values:


num_inference_stepsint ( default: 20 ) Affects Pricing

Number of denoising steps.

min : 20,

max : 100


guidance_scalefloat ( default: 7.5 )

Scale for classifier-free guidance

min : 0.1,

max : 25


samplesint ( default: 1 ) Affects Pricing

Number of samples to generate.

min : 1,

max : 4


seedint ( default: -1 )

Seed for image generation.


img_widthenum:int ( default: 512 ) Affects Pricing

Width of the image.

Allowed values:


img_heightenum:int ( default: 512 ) Affects Pricing

Height of the Image

Allowed values:


base64boolean ( default: 1 )

Base64 encoding of the output image.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

CyberRealistic

Introducing CyberRealistic, a versatile photorealistic model that stands as a testament to the power of rigorous testing and innovative blending of various AI models. This model is the brainchild of Cyberdelia, an active member of the AI community, who has meticulously crafted it to deliver high-quality, unique outputs. CyberRealistic is not just a product of various AI models, but it also incorporates several custom elements, adding an extra layer of uniqueness to its output.

On the technical front, CyberRealistic is based on the Stable Diffusion 1.5 base model, a robust and reliable foundation for AI models. This model is a highly specialized Image generation AI Model of the type Safetensors / Checkpoint AI Model. It has undergone an extensive fine-tuning process, leveraging a dataset consisting of images generated by other AI models or user-contributed data. This fine-tuning process ensures that CyberRealistic is capable of generating images that are highly relevant to the specific use-cases it was designed for.

One of the key advantages of CyberRealistic lies in its ability to effectively process textual inversions and LORA, providing accurate and detailed outputs. Furthermore, the model requires minimal prompts, making it incredibly user-friendly and accessible. Its unique blend of custom elements and the power of the Stable Diffusion 1.5 base model make it a standout choice for a wide range of applications.

CyberRealistic Use cases

  1. Photorealistic Image Generation: With its ability to generate highly realistic images, CyberRealistic can be used in fields like advertising, gaming, and virtual reality to create lifelike visuals.

  2. Female Character Creation: Given its fine-tuning for generating images of females, it can be used in character design for video games, animations, and digital art.

  3. Textual Inversion Processing: Its capability to handle textual inversions makes it a valuable tool in natural language processing tasks, including sentiment analysis, text generation, and more.

  4. User-friendly AI Applications: With minimal prompts required, it can be used to develop user-friendly AI applications that require less input from the user.

  5. Custom Element Incorporation: The model's ability to incorporate custom elements can be leveraged in creating unique, personalized AI outputs for various applications.

CyberRealistic license

The license for the CyberRealistic model, known as the "CreativeML Open RAIL-M" license, is designed to promote both open and responsible use of the model. You may add your own copyright statement to your modifications and provide additional or different license terms for your modifications. You are accountable for the output you generate using the model, and no use of the output can contravene any provision as stated in the license.