One prompt. A finished book.

Open Nellie Sign in

GET /v1/models

Retrieve available Nellie AI models and their credit costs.

Overview

This endpoint returns a list of available Nellie AI models with their names, descriptions, and credit costs per book. Use it to display model options to users or calculate expected costs.

Endpoint

GET https://api.nelliewriter.com/v1/models

Authentication

Not required. This is a public endpoint.

Example Request

cURL

curl https://api.nelliewriter.com/v1/models

Python SDK

from nellie_api import Nellie

client = Nellie(api_key="nel_your_api_key")
models = client.get_models()

for model in models:
    print(f"{model.name}: {model.cost_per_book} credits")

Python (requests)

import requests

response = requests.get("https://api.nelliewriter.com/v1/models")
data = response.json()

for model in data["data"]:
    print(f"{model['name']}: {model['cost_per_book']} credits")

JavaScript

const response = await fetch('https://api.nelliewriter.com/v1/models');
const { data } = await response.json();

data.forEach(model => {
  console.log(`${model.name}: ${model.cost_per_book} credits`);
});

Response

Success (200 OK)

{
  "success": true,
  "data": [
    {
      "id": "2.0",
      "name": "Nellie 2.0 (Standard)",
      "description": "Balanced performance for fast standard books.",
      "cost_per_book": 250
    },
    {
      "id": "3.0",
      "name": "Nellie 3.0 (Premium)",
      "description": "Higher creativity and coherence for complex plots.",
      "cost_per_book": 500
    }
  ]
}

Response Fields

FieldTypeDescription
successbooleanAlways true for successful requests
dataarrayList of available models
data[].idstringModel identifier (use in POST /v1/book)
data[].namestringHuman-readable model name
data[].descriptionstringModel capabilities description
data[].cost_per_bookintegerBase credits per generation

Available Models

Nellie 2.0 (Standard)

PropertyValue
ID"2.0"
Cost250 credits
SpeedFast
QualityGood

Best for:

  • Standard novels
  • High-volume generation
  • Cost-conscious projects
  • Bulk generation

Nellie 3.0 (Premium)

PropertyValue
ID"3.0"
Cost500 credits
SpeedSlower
QualityExcellent

Best for:

  • Complex narratives with multiple plot threads
  • Character-driven dramas
  • Projects requiring high coherence
  • Professional-quality output

Model Comparison

FeatureNellie 2.0Nellie 3.0
Cost250 credits500 credits
Speed~20-30 min~45-80 min
Plot complexityGoodExcellent
Character depthGreatExcellent
CoherenceExcellentExcellent
CreativityGreatExcellent
Image QualityGoodExcellent

Use Cases

Display Model Selector

async function displayModelOptions() {
  const response = await fetch('https://api.nelliewriter.com/v1/models');
  const { data } = await response.json();
  
  const container = document.getElementById('model-options');
  
  data.forEach(model => {
    const card = document.createElement('div');
    card.innerHTML = `
      <h3>${model.name}</h3>
      <p>${model.description}</p>
      <p><strong>${model.cost_per_book} credits</strong></p>
      <button onclick="selectModel('${model.id}')">Select</button>
    `;
    container.appendChild(card);
  });
}

Calculate Expected Cost

import requests

def estimate_cost(model_id: str, include_images: bool = False) -> int:
    """Estimate the credit cost for a generation."""
    response = requests.get("https://api.nelliewriter.com/v1/models")
    models = {m["id"]: m for m in response.json()["data"]}
    
    if model_id not in models:
        raise ValueError(f"Unknown model: {model_id}")
    
    base_cost = models[model_id]["cost_per_book"]
    
    # Images add approximately 50% to the cost
    if include_images:
        base_cost = int(base_cost * 1.5)
    
    return base_cost

# Usage
cost = estimate_cost("3.0", include_images=True)
print(f"Estimated cost: {cost} credits")

Pre-flight Cost Check

from nellie_api import Nellie

client = Nellie(api_key="nel_...")

# Get user's credits
usage = client.get_usage()
available = 10000 - usage.total_credits_used  # Assuming 10 credits

# Get model cost
models = client.get_models()
model_3 = next(m for m in models if m.id == "3.0")

if available >= model_3.cost_per_book:
    book = client.books.create(
        prompt="A sci-fi epic",
        model="3.0"
    )
else:
    print(f"Insufficient credits. Need {model_3.cost_per_book}, have {available}")

Credit Costs

The cost_per_book is the base cost.

See Also