Loading...
New: Explore 50+ AI models — image, video, audio & text generation via one API.Explore models →
Loading...
Pay only for what you use. No minimums.
Sign in to run models
Run to see results
Configure parameters and click Run
import requests
result = requests.post(
'https://api.pixelbyte.app/v1/jobs/submit',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
},
json={
'model': 'google/nano-banana-pro/text-to-image',
'input': {}
}
)import time
job_id = result.json()['jobId']
while True:
response = requests.get(
f'https://api.pixelbyte.app/v1/jobs/{'{job_id}'}',
headers={'Authorization': f'Bearer {'{API_KEY}'}'}
)
data = response.json()['data']
if data['status'] == 'completed':
print('Done!', data['outputs'][0]['url'])
break
elif data['status'] == 'failed':
raise Exception(f"Job failed: {'{'}data['error']['message']{'}'}")
time.sleep(2)