Quick Start
Get your first AI-generated image in 5 minutes.
1
Create an API Key
- Go to Settings → API Keys
- Click "Create New Key"
- Give it a name (e.g., "Development")
- Copy and save the key securely — you won't see it again!
2
Make Your First Request
Create a prediction by sending a POST request to the predictions endpoint:
cURL
1curl -X POST https://api.deepcreativelabs.com/v1/google/nano-banana/predictions \
2 -H "Authorization: Bearer YOUR_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "input": {
6 "prompt": "A cat wearing sunglasses on a beach"
7 }
8 }'Node.js
1const response = await fetch('https://api.deepcreativelabs.com/v1/google/nano-banana/predictions', {
2 method: 'POST',
3 headers: {
4 'Authorization': 'Bearer YOUR_API_KEY',
5 'Content-Type': 'application/json',
6 },
7 body: JSON.stringify({
8 input: {
9 prompt: 'A cat wearing sunglasses on a beach'
10 }
11 })
12});
13
14const prediction = await response.json();
15console.log(prediction.job_id); // pred_abc123Python
1import requests
2
3response = requests.post(
4 'https://api.deepcreativelabs.com/v1/google/nano-banana/predictions',
5 headers={
6 'Authorization': 'Bearer YOUR_API_KEY',
7 'Content-Type': 'application/json'
8 },
9 json={
10 'input': {
11 'prompt': 'A cat wearing sunglasses on a beach'
12 }
13 }
14)
15
16prediction = response.json()
17print(prediction['id']) # pred_abc1233
Get the Result
Predictions run asynchronously. Poll the prediction status until it completes:
cURL
1curl https://api.deepcreativelabs.com/v1/predictions/pred_abc123 \
2 -H "Authorization: Bearer YOUR_API_KEY"Response when complete:
Response
1{
2 "job_id": "pred_abc123",
3 "status": "succeeded",
4 "model": "google/nano-banana",
5 "output": [
6 "https://cdn.deepcreativelabs.com/outputs/abc123.png"
7 ],
8 "metrics": {
9 "predict_time": 2.34
10 },
11 "created_at": "2025-01-15T10:30:00Z",
12 "completed_at": "2025-01-15T10:30:02Z"
13}