HotshotXL

A text-to-GIF model that works on Stable Diffusion XL.


API

If you're looking for an API, you can choose from your desired programming language.

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 import requests api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/hotshot-xl" # Prepare data and files data = {} files = {} data['mp4'] = False data['seed'] = 6226 data['steps'] = 30 data['width'] = 672 data['height'] = 384 data['prompt'] = "a dog running towards you with a smile, hd, high quality" data['scheduler'] = "EulerAncestralDiscreteScheduler" data['negative_prompt'] = "blurry" headers = {'x-api-key': api_key} # If no files, send as JSON if files: response = requests.post(url, data=data, files=files, headers=headers) else: 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


mp4bool ( default: 1 )

Save as mp4, False for GIF


seedint ( default: 6226 )

Random seed. Leave blank to randomize the seed


stepsint ( default: 30 )

Number of denoising steps

min : 1,

max : 500


widthenum:int ( default: 672 )

An enumeration.

Allowed values:


heightenum:int ( default: 384 )

An enumeration.

Allowed values:


promptstr ( default: 1 )

Input prompt


schedulerenum:str ( default: EulerAncestralDiscreteScheduler )

An enumeration.

Allowed values:


negative_promptstr ( default: blurry )

Negative prompt

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.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.