Expand prompts
Prompt expansion uses an LLM to make prompts more elaborate, which tends to produce better images.
View Prompt Expansion in our API reference for more
import requests
url = "https://playground.com/api/models/external/v1/expand-prompt"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
}
data = {
"prompt": "a frog",
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Updated 4 months ago