curl -X POST https://api.nexusify.co/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash",
"messages": [
{"role": "user", "content": "Explain relativity to a 5 year old."}
]
}'
const res = await fetch('https://api.nexusify.co/v1/generate-image', {
method: 'POST',
headers: {
'Authorization': 'Bearer KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: "Cyberpunk city with neon rain, cinematic lighting",
model: "flux",
width: 1024,
height: 1024
})
});
const data = await res.json();
console.log(data.imageUrl);