You can generate text prompt from uploaded image, refine your prompt or get suggested prompt.
import requests
url = "https://api.vimmerse.net/text/prompt"
headers = {
'X-Api-Key': 'YOUR_API_KEY',
}
files=[
('image_file',('file',open('/path/to/file','rb'),'application/octet-stream'))
]
payload = {
"option": "Image2Prompt", ## "InspireMe" option will also generate refined prompt from image.
}
response = requests.request("POST", url, headers=headers, files=files, data=payload)
print(response.text)
import requests
url = "https://api.vimmerse.net/text/prompt"
headers = {
'X-Api-Key': 'YOUR_API_KEY',
}
payload = {
"option": "RefinePrompt", ## "InspireMe" option will also generate refined prompt
"prompt": "A nurse girl holding an injection and smiling"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
import requests
url = "https://api.vimmerse.net/text/prompt"
headers = {
'X-Api-Key': 'YOUR_API_KEY',
}
payload = {
"option": "SuggestPrompt", ## "InspireMe" option will also generate suggested prompt
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Generated Text Prompt
Bad Request
Validation Error
{- "data": "Imagine a futuristic cityscape where skyscrapers reach up to touch the stars, illuminated by neon lights and pulsating with energy. In the midst of it all, a sleek and powerful spacecraft hovers effortlessly, casting a beam of light down onto the bustling metropolis below. The scene captures the perfect blend of advanced technology, urban vibrancy, and infinite possibility. Bring this breathtaking vision to life with your creative expertise."
}