banatie-service/docs/api/api.rest

70 lines
2.0 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@base = http://localhost:3000
### Health
GET {{base}}/health
### Info
GET {{base}}/api/info
### enhance
POST {{base}}/api/enhance
Content-Type: application/json
{
"prompt": "Два мага сражаются в снежном лесу. У одного из них в руках посох, из которого вырывается молния, а другой маг защищается щитом из льда. Вокруг них падают снежинки, и на заднем плане видны заснеженные деревья и горы.",
"options": {
"imageStyle": "photorealistic",
"aspectRatio": "landscape",
"mood": "serene and peaceful",
"lighting": "golden hour",
"cameraAngle": "wide shot",
"outputFormat": "detailed",
"negativePrompts": ["blurry", "low quality"]
}
}
### Generate image from text
POST {{base}}/api/text-to-image
Content-Type: application/json
{
"prompt": "A majestic eagle soaring over snow-capped mountains",
"filename": "test-eagle"
}
### Generate Image with Files
POST {{base}}/api/generate
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
------WebKitFormBoundary
Content-Disposition: form-data; name="prompt"
A majestic dragon soaring through a crystal cave filled with glowing blue crystals, sunbeams piercing through cracks in the ceiling creating dramatic lighting, highly detailed fantasy art style
------WebKitFormBoundary
Content-Disposition: form-data; name="filename"
dragon-crystal-cave
------WebKitFormBoundary
Content-Disposition: form-data; name="autoEnhance"
true
------WebKitFormBoundary
Content-Disposition: form-data; name="enhancementOptions"
{"imageStyle":"illustration","aspectRatio":"landscape","mood":"mystical and dramatic","lighting":"magical glow with sunbeams","cameraAngle":"wide shot","negativePrompts":["blurry","low quality","amateur"]}
------WebKitFormBoundary
Content-Disposition: form-data; name="referenceImages"; filename="reference.jpg"
Content-Type: image/jpeg
< ./reference.jpg
------WebKitFormBoundary--