Quick start
curl 'https://api.imagerouter.io/v1/openai/images/generations' \-H 'Authorization: Bearer YOUR_API_KEY' \-H 'Content-Type: application/json' \--data-raw '{"prompt": "YOUR_PROMPT", "model": "test/test"}'
const url = 'https://api.imagerouter.io/v1/openai/images/generations';const options = { method: 'POST', headers: {Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}, body: '{"prompt": "YOUR_PROMPT", "model": "test/test"}'};
const response = await fetch(url, options);const data = await response.json();console.log(data);
import requests
url = "https://api.imagerouter.io/v1/openai/images/generations"payload = { "prompt": "YOUR_PROMPT", "model": "test/test",}headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)print(response.json())
Note that our beta API has some limitations.