Text

APIs for generating and editing prompt.

Generate Text Prompt

You can generate text prompt from uploaded image, refine your prompt or get suggested prompt.

Example Code

Generate text prompt from image.

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)

Generate refined prompt from prompt

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)

Generate suggested prompt

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)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
image_file
string <binary> (Base image)
Deprecated
image_url
string (Base Image URL)
Default: ""
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

prompt
string (Prompt)
Default: ""

Your prompt.

mode
string (Mode)
Default: "scene"

Your prompt refinement mode.

option
string (Option)
Default: "InspireMe"

Available values are Image2Prompt, SuggestPrompt, RefinePrompt and InspireMe. Image2Prompt generates prompt from image, SuggestPrompt is generating an suggested prompt, RefinePrompt refines prompt from your prompt. InspireMe is automatically generating prompt based on your submission.

Responses
200

Generated Text Prompt

400

Bad Request

422

Validation Error

post/text/prompt
Request samples
Response samples
application/json
{
  • "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."
}