Getting started
Quickstart
From an API key to a finished image in about ten seconds.
This walks the full loop: submit a prompt, wait for the job, download the result.
1. Submit a prompt
curl -X POST https://api.journeyapi.dev/v1/images \
-H "Authorization: Bearer $JOURNEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a lighthouse on a basalt cliff, fog, long exposure",
"aspect_ratio": "3:2",
"n": 2
}'{
"id": "job_01HQ8VZ3K9XM2P",
"object": "job",
"type": "image",
"status": "queued",
"progress": 0,
"cost_usd": 0.10,
"created_at": "2026-09-18T09:14:02Z"
}2. Wait for the result
Poll the job, or register a webhook and skip polling entirely. Once a second is fine; reads are not rate limited alongside generation.
curl https://api.journeyapi.dev/v1/jobs/job_01HQ8VZ3K9XM2P \
-H "Authorization: Bearer $JOURNEY_API_KEY"{
"id": "job_01HQ8VZ3K9XM2P",
"object": "job",
"type": "image",
"status": "succeeded",
"progress": 100,
"model": "image-2",
"prompt": "a lighthouse on a basalt cliff, fog, long exposure",
"params": {
"n": 2,
"aspect_ratio": "3:2",
"style_strength": 35,
"detail": "standard",
"seed": 3064958390
},
"images": [
{
"id": "img_01HQ8VZ4T2B7MC",
"url": "https://cdn.journeyapi.dev/i/01HQ8VZ4T2B7MC.png",
"width": 1456,
"height": 972
},
{
"id": "img_01HQ8VZ4T2B7MD",
"url": "https://cdn.journeyapi.dev/i/01HQ8VZ4T2B7MD.png",
"width": 1456,
"height": 972
}
],
"cost_usd": 0.10,
"created_at": "2026-09-18T09:14:02Z",
"completed_at": "2026-09-18T09:14:11Z"
}3. Upscale the one you want
Generation returns images at 1456 px on the long edge. Upscaling takes one image id and returns it at full resolution.
curl -X POST https://api.journeyapi.dev/v1/images/upscale \
-H "Authorization: Bearer $JOURNEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "image_id": "img_01HQ8VZ4T2B7MC" }'Node
const key = process.env.JOURNEY_API_KEY;
const headers = {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json",
};
const res = await fetch("https://api.journeyapi.dev/v1/images", {
method: "POST",
headers,
body: JSON.stringify({
prompt: "a lighthouse on a basalt cliff, fog, long exposure",
aspect_ratio: "3:2",
}),
});
let job = await res.json();
// Poll until the job leaves a non-terminal state.
while (job.status === "queued" || job.status === "running") {
await new Promise((r) => setTimeout(r, 1000));
const poll = await fetch(`https://api.journeyapi.dev/v1/jobs/${job.id}`, { headers });
job = await poll.json();
}
console.log(job.images.map((i) => i.url));Python
import os, time, requests
BASE = "https://api.journeyapi.dev/v1"
headers = {"Authorization": f"Bearer {os.environ['JOURNEY_API_KEY']}"}
job = requests.post(
f"{BASE}/images",
headers=headers,
json={"prompt": "a lighthouse on a basalt cliff, fog, long exposure"},
).json()
while job["status"] in ("queued", "running"):
time.sleep(1)
job = requests.get(f"{BASE}/jobs/{job['id']}", headers=headers).json()
for image in job["images"]:
print(image["url"])