DALL·E 3
curl --request POST \
--url https://api.maxapi.ai/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A colorful sunset over the mountains"
}
'import requests
url = "https://api.maxapi.ai/v1/images/generations"
payload = { "prompt": "A colorful sunset over the mountains" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({prompt: 'A colorful sunset over the mountains'})
};
fetch('https://api.maxapi.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/v1/images/generations"
payload := strings.NewReader("{\n \"prompt\": \"A colorful sunset over the mountains\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.maxapi.ai/v1/images/generations")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A colorful sunset over the mountains\"\n}")
.asString();{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}DALL·E 3
Use this endpoint to call the provider-compatible dall·e 3 operation through MaxAPI.
POST
https://api.maxapi.ai
/
v1
/
images
/
generations
DALL·E 3
curl --request POST \
--url https://api.maxapi.ai/v1/images/generations \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A colorful sunset over the mountains"
}
'import requests
url = "https://api.maxapi.ai/v1/images/generations"
payload = { "prompt": "A colorful sunset over the mountains" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({prompt: 'A colorful sunset over the mountains'})
};
fetch('https://api.maxapi.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/v1/images/generations"
payload := strings.NewReader("{\n \"prompt\": \"A colorful sunset over the mountains\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.maxapi.ai/v1/images/generations")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"A colorful sunset over the mountains\"\n}")
.asString();{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}Headers
Body
application/json