Tiempo limitado: 50 % de descuento en todos los planes

Paper Banana API Reference

The Paper Banana API lets you generate academic illustrations and scientific diagrams programmatically.

Paper Banana API Overview

The Paper Banana API provides a simple RESTful interface for generating high-quality academic illustrations, scientific diagrams, and research figures. Integrate Paper Banana API into your workflow to automate figure creation for papers, posters, and presentations.

Base URL: https://paperbanana.run/api/v1

All API requests must be made over HTTPS. HTTP requests will be rejected.

Paper Banana API Authentication

All Paper Banana API requests require authentication via a Bearer token. Include your API key in the Authorization header:

Authorization: Bearer sk-your-api-key-here

API keys can be created and managed from your API Keys dashboard. Keys are prefixed with sk-.

Important: Keep your API keys secret. Do not share them in client-side code, public repositories, or any publicly accessible location.

Team Plans

API access requires an active Team plan. Three tiers are available:

PlanPriceCredits/YearAPI KeysRate Limit
Team Basic$999/year75,0003120 RPM
Team Pro$1,499/year115,00010300 RPM
Team Enterprise$2,999/year225,00025600 RPM

API Rate Limiting

Paper Banana API requests are rate-limited based on your Team plan tier. Rate limits are applied per API key.

When you exceed the rate limit, the API returns a 429 Too Many Requests response. Wait and retry with exponential backoff.

Paper Banana API Endpoints

GET/api/v1/credits

Get your current credit balance and plan info.

Response

{
  "success": true,
  "data": {
    "remaining_credits": 45000,
    "team_plan": "team-pro",
    "rate_limit_rpm": 300
  }
}
POST/api/v1/generate

Generate an image. Supports two modes: standard (Nano Banana) and pipeline (Paper Banana academic illustration).

Request Body

FieldTypeRequiredDescription
typestringYes"standard" or "pipeline"
promptstringYesText description (max 10,000 chars)
modelstringNo"nano-banana-pro" (default), "nano-banana", "nano-banana-2"
options.resolutionstringNo"1K" (default), "2K", "4K"
options.aspect_ratiostringNo"1:1" (default), "16:9", "9:16", etc.
options.image_inputstring[]NoReference image URLs (max 10, HTTPS only)
options.contentstringNoPaper content for pipeline mode (max 100K chars)

Example: Standard Generation

curl -X POST https://paperbanana.run/api/v1/generate \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "standard",
    "prompt": "A detailed diagram of a neural network architecture",
    "model": "nano-banana-pro",
    "options": {
      "resolution": "2K",
      "aspect_ratio": "16:9"
    }
  }'

Response

{
  "success": true,
  "data": {
    "task_id": "abc123-def456",
    "type": "standard",
    "model": "nano-banana-pro",
    "credits_used": 15,
    "status": "processing"
  }
}
GET/api/v1/tasks

List your generation tasks. Supports pagination and filtering.

Query Parameters

ParamDefaultDescription
page1Page number
limit20Items per page (max 100)
typeall"standard" or "pipeline"
statusall"pending", "processing", "success", "failed"
GET/api/v1/task/:taskId

Get the status and result of a specific task.

Response (completed)

{
  "success": true,
  "data": {
    "task_id": "abc123-def456",
    "type": "standard",
    "status": "success",
    "prompt": "A neural network diagram",
    "model": "nano-banana-pro",
    "resolution": "2K",
    "credits_used": 15,
    "output_urls": [
      "https://image.paperbanana.run/result.png"
    ],
    "created_at": "2026-04-15T10:00:00Z",
    "completed_at": "2026-04-15T10:00:45Z"
  }
}

Paper Banana API Credit Costs

Paper Banana API calls consume credits at full price (no resolution discount).

TypeResolutionCredits
Standard / Pipeline1K10
Standard / Pipeline2K15
Standard / Pipeline4K25

API Error Codes

StatusMeaning
400Bad Request — Invalid parameters
401Unauthorized — Invalid or missing API key
402Payment Required — Insufficient credits
403Forbidden — No Team plan or exceeded limits
404Not Found — Task does not exist
429Too Many Requests — Rate limit exceeded
500Internal Server Error
502Bad Gateway — Upstream generation service error

All error responses include an error field with a human-readable message.

Paper Banana API Quick Start

1. Check your credits

curl -H "Authorization: Bearer sk-your-key" \
  https://paperbanana.run/api/v1/credits

2. Generate an image

curl -X POST https://paperbanana.run/api/v1/generate \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "standard",
    "prompt": "A red apple on a white background",
    "model": "nano-banana-pro"
  }'

3. Check task status

curl -H "Authorization: Bearer sk-your-key" \
  https://paperbanana.run/api/v1/task/TASK_ID_HERE

4. List all tasks

curl -H "Authorization: Bearer sk-your-key" \
  "https://paperbanana.run/api/v1/tasks?page=1&limit=10"