Playground25ImageGeneration
curl --request POST \
--url https://openapi.monica.im/v1/image/gen/playground \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A beautiful sunset over the ocean",
"model": "playground-v2-5",
"negative_prompt": "",
"count": 1,
"size": "1024x1024",
"step": 30,
"seed": "0",
"safety_check": false,
"cfg_scale": "7.0"
}
'import requests
url = "https://openapi.monica.im/v1/image/gen/playground"
payload = {
"prompt": "A beautiful sunset over the ocean",
"model": "playground-v2-5",
"negative_prompt": "",
"count": 1,
"size": "1024x1024",
"step": 30,
"seed": "0",
"safety_check": False,
"cfg_scale": "7.0"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'A beautiful sunset over the ocean',
model: 'playground-v2-5',
negative_prompt: '',
count: 1,
size: '1024x1024',
step: 30,
seed: '0',
safety_check: false,
cfg_scale: '7.0'
})
};
fetch('https://openapi.monica.im/v1/image/gen/playground', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.monica.im/v1/image/gen/playground",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'A beautiful sunset over the ocean',
'model' => 'playground-v2-5',
'negative_prompt' => '',
'count' => 1,
'size' => '1024x1024',
'step' => 30,
'seed' => '0',
'safety_check' => false,
'cfg_scale' => '7.0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.monica.im/v1/image/gen/playground"
payload := strings.NewReader("{\n \"prompt\": \"A beautiful sunset over the ocean\",\n \"model\": \"playground-v2-5\",\n \"negative_prompt\": \"\",\n \"count\": 1,\n \"size\": \"1024x1024\",\n \"step\": 30,\n \"seed\": \"0\",\n \"safety_check\": false,\n \"cfg_scale\": \"7.0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://openapi.monica.im/v1/image/gen/playground")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A beautiful sunset over the ocean\",\n \"model\": \"playground-v2-5\",\n \"negative_prompt\": \"\",\n \"count\": 1,\n \"size\": \"1024x1024\",\n \"step\": 30,\n \"seed\": \"0\",\n \"safety_check\": false,\n \"cfg_scale\": \"7.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.monica.im/v1/image/gen/playground")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"A beautiful sunset over the ocean\",\n \"model\": \"playground-v2-5\",\n \"negative_prompt\": \"\",\n \"count\": 1,\n \"size\": \"1024x1024\",\n \"step\": 30,\n \"seed\": \"0\",\n \"safety_check\": false,\n \"cfg_scale\": \"7.0\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"url": "<string>"
}
]
}Image generation
Playground models
POST
/
v1
/
image
/
gen
/
playground
Playground25ImageGeneration
curl --request POST \
--url https://openapi.monica.im/v1/image/gen/playground \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A beautiful sunset over the ocean",
"model": "playground-v2-5",
"negative_prompt": "",
"count": 1,
"size": "1024x1024",
"step": 30,
"seed": "0",
"safety_check": false,
"cfg_scale": "7.0"
}
'import requests
url = "https://openapi.monica.im/v1/image/gen/playground"
payload = {
"prompt": "A beautiful sunset over the ocean",
"model": "playground-v2-5",
"negative_prompt": "",
"count": 1,
"size": "1024x1024",
"step": 30,
"seed": "0",
"safety_check": False,
"cfg_scale": "7.0"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'A beautiful sunset over the ocean',
model: 'playground-v2-5',
negative_prompt: '',
count: 1,
size: '1024x1024',
step: 30,
seed: '0',
safety_check: false,
cfg_scale: '7.0'
})
};
fetch('https://openapi.monica.im/v1/image/gen/playground', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.monica.im/v1/image/gen/playground",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'A beautiful sunset over the ocean',
'model' => 'playground-v2-5',
'negative_prompt' => '',
'count' => 1,
'size' => '1024x1024',
'step' => 30,
'seed' => '0',
'safety_check' => false,
'cfg_scale' => '7.0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.monica.im/v1/image/gen/playground"
payload := strings.NewReader("{\n \"prompt\": \"A beautiful sunset over the ocean\",\n \"model\": \"playground-v2-5\",\n \"negative_prompt\": \"\",\n \"count\": 1,\n \"size\": \"1024x1024\",\n \"step\": 30,\n \"seed\": \"0\",\n \"safety_check\": false,\n \"cfg_scale\": \"7.0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://openapi.monica.im/v1/image/gen/playground")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A beautiful sunset over the ocean\",\n \"model\": \"playground-v2-5\",\n \"negative_prompt\": \"\",\n \"count\": 1,\n \"size\": \"1024x1024\",\n \"step\": 30,\n \"seed\": \"0\",\n \"safety_check\": false,\n \"cfg_scale\": \"7.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.monica.im/v1/image/gen/playground")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"A beautiful sunset over the ocean\",\n \"model\": \"playground-v2-5\",\n \"negative_prompt\": \"\",\n \"count\": 1,\n \"size\": \"1024x1024\",\n \"step\": 30,\n \"seed\": \"0\",\n \"safety_check\": false,\n \"cfg_scale\": \"7.0\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"url": "<string>"
}
]
}Follow the quickstart guide to get your own API Key.
- Latest iteration of Playground’s image generation technology
- Cost-effective solution for high-quality image generation
- Features:
- Strong artistic style interpretation
- Good composition and coherence
- Efficient processing speed
- Reliable output quality
- Best for:
- Creative projects
- Digital art creation
- Content generation
- Rapid prototyping
- Personal and commercial use
- Playground V2.5

Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Prompt to use for the image generation process.
Required string length:
1 - 4000Example:
"A beautiful sunset over the ocean"
Available options:
playground-v2-5 Example:
"playground-v2-5"
Negative prompt to use for the image generation process.
Maximum string length:
4000Example:
""
The number of images to generate. Between 1 and 4.
Required range:
1 <= x <= 4Example:
1
The size of the generated images.
Available options:
1024x1024, 768x1344, 1344x768 Example:
"1024x1024"
Number of steps to use for the image generation process. Between 1 and 50.
Required range:
1 <= x <= 50Example:
30
Random seed to use for the image generation process. If 0, we will use a totally random seed. Between 0 and 2147483647.
Required range:
x <= 2147483647Example:
"0"
Enable a safety check for each response.
Example:
false
Classifier-free guidance scale for the image diffusion process.
Example:
"7.0"
Response
200 - application/json
Success
An array of generated image URLs.
Show child attributes
Show child attributes