Getting started
Quickstart
Generate your first image in under a minute. All you need is a key and a prompt.
1. cURL
curl https://qaves.me/api/v1/images/generations \
-H "Authorization: Bearer sk_qu_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A neon orange fox in a forest"
}'2. JavaScript / TypeScript (fetch)
const res = await fetch("https://qaves.me/api/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.QAVES_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gpt-image-2",
prompt: "A neon orange fox in a forest",
}),
});
const json = await res.json();
if (!res.ok) throw new Error(json.error?.message ?? "Request failed");
console.log(json.data[0].url);3. Python
import os, requests
r = requests.post(
"https://qaves.me/api/v1/images/generations",
headers={
"Authorization": f"Bearer {os.environ['QAVES_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "gpt-image-2",
"prompt": "A neon orange fox in a forest",
},
timeout=120,
)
r.raise_for_status()
print(r.json()["data"][0]["url"])What you get back
A JSON object with the generated image URL plus useful metadata:
{
"created_at": 1778833800,
"model": "gpt-image-2",
"quality": "medium",
"prompt": "A neon orange fox in a forest",
"bucket": "default",
"size": "1024x1024",
"key_source": "free",
"completion_ms": 4821,
"rate_limit": {
"limit": 20,
"used": 3,
"remaining": 17,
"next_available_at": 1778920200
},
"data": [{ "url": "https://qaves.me/api/i/<id>.png" }]
}Tip
The
url is permanent and CDN-cached. Embed it directly in Discord messages, websites, or save it to your own database.