https://api.hyprlab.io/v1
https://api.hyprlab.io/v1/images/generations
curl https://api.hyprlab.io/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "photon",
"prompt": "cat",
"aspect_ratio": "16:9",
"image_reference_url": "https://site.com/path/of/image.png"
"image_reference_weight": 0.85,
"style_reference_url": "https://site.com/path/of/image.png"
"style_reference_weight": 0.85,
"character_reference_url": "https://site.com/path/of/image.png"
"response_format": "url",
"output_format": "png"
}'
👉🏻 Request Body Documentation
prompt
(string, required
)
Description: Main text input to guide the generation process.
Validation Rules:
Must be a non-empty string.
Must not exceed 10,000 characters.
aspect_ratio
(string, optional
)
Description: Defines the aspect ratio of the output.
Validation Rules:
Must be one of the following valid aspect ratios:
image_reference_url
(string, optional
)
Description: URL, Data URI, or base64 string for an image to be used as a reference.
Validation Rules:
Must not be an empty string if provided.
If a Data URI (e.g., starts with data:image
):
Must be a valid Data URI format (e.g., data:image/png;base64,iVBORw0KGgo...
).
The base64 content part must not be empty.
If an HTTP/HTTPS URL:
Must be a valid URL (e.g., http://example.com/image.png
or https://example.com/image.png
).
image_reference_weight
(number, optional
)
Description: Specifies the influence of the image_reference_url
.
Validation Rules:
Must be between 0 and 1 (inclusive).
style_reference_url
(string, optional
)
Description: URL, Data URI, or base64 string for an image whose style will be referenced.
Validation Rules:
Must not be an empty string if provided.
If a Data URI (e.g., starts with data:image
):
Must be a valid Data URI format.
The base64 content part must not be empty.
style_reference_weight
(number, optional
)
Description: Specifies the influence of the style_reference_url
.
Validation Rules:
Must be between 0 and 1 (inclusive).
character_reference_url
(string, optional
)
Description: URL, Data URI, or base64 string for an image whose character features will be referenced.
Validation Rules:
Must not be an empty string if provided.
If a Data URI (e.g., starts with data:image
):
Must be a valid Data URI format.
The base64 content part must not be empty.
response_format
(string, optional
)
Description: Defines how the response data is formatted.
Validation Rules:
Must be either url
or b64_json
.
output_format
(string, optional
)
Description: Specifies the format of the output image.
Validation Rules:
Must be one of the following formats: