curl --request POST \ --url https://api.omnirelay.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-image-2", "prompt": "A red bicycle on a white background"}'
import requests
url = "https://api.omnirelay.ai/v1/images/generations"
payload = {
"model": "gpt-image-2",
"prompt": "A red bicycle on a white background"
}
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({model: 'gpt-image-2', prompt: 'A red bicycle on a white background'})
};
fetch('https://api.omnirelay.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request POST \ --url https://api.omnirelay.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-image-2", "prompt": "A red bicycle on a white background"}'
import requests
url = "https://api.omnirelay.ai/v1/images/generations"
payload = {
"model": "gpt-image-2",
"prompt": "A red bicycle on a white background"
}
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({model: 'gpt-image-2', prompt: 'A red bicycle on a white background'})
};
fetch('https://api.omnirelay.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));