All help articles

Connect an AI key (and what it costs)

How to connect an OpenRouter, OpenAI, Anthropic or Google key to NovelCanon, what the AI costs, how to cap your spending, and what to do when AI stops working.

Last updated

To connect an AI key, open API keys in the top bar and click Connect OpenRouter, or click + Add key next to OpenAI, Anthropic or Google AI and paste a key from that provider. NovelCanon never resells AI: every request runs on your own provider account, and the provider bills you directly at its own prices.

Which provider should I choose?

If you don't have a key yet, start with OpenRouter. One OpenRouter account reaches hundreds of models from many vendors, it runs on prepaid credit so there are no surprise bills, and connecting it takes one click.

If you already pay for OpenAI, Anthropic or Google AI, use that key instead. You can connect several providers; the one marked Primary ★ is used first, and Set as primary changes it.

How do I connect OpenRouter?

  1. Open API keys in the top bar.
  2. On the OpenRouter card, click Connect OpenRouter.
  3. Sign in to OpenRouter, or create an account.
  4. Approve NovelCanon. The key is created and saved for you, so there is nothing to copy.

If you created your OpenRouter account during step 3, you may land back in NovelCanon without a key. Click Connect OpenRouter again and you'll go straight to the approval screen.

How do I add an OpenAI, Anthropic or Google key?

  1. Create a key in your provider's dashboard. The card's Get your key from link opens the right page.
  2. On API keys, click + Add key on that provider's card.
  3. Paste the key and click Save & verify.

The card shows Verified ✓ when the provider accepts the key. Saved — not verified means it was stored but the check didn't pass; click Re-verify, or Replace to paste a different key.

Is my key safe?

Your key is encrypted before it's stored and is only decrypted in server memory for the moment an AI request runs. It is never logged, cached or shown back to you; the card only displays its first few characters.

What does the AI cost?

You pay your provider for what you use. There are two kinds of AI use in NovelCanon:

  • AI writing (the AI panel and AI Chat) runs on the model you pick under Model for AI operations on the provider's card. On OpenRouter this can be a free model.
  • Background analysis (reading your scenes for facts, building your Story Bible and checking for contradictions) always runs on a low-cost analysis model, whatever you picked for writing. On OpenRouter it is a paid model, typically costing cents per book, because free models are too unreliable for it. Add a few dollars of credit to your OpenRouter account or this analysis can't run.

Larger jobs tell you the price first. Importing a manuscript shows "will cost up to about…" before you click Import, and the full-book Check for contradictions (Pro) shows an estimate and waits for your approval.

Separately from cost, the Free and Manuscript plans include 20 AI writing actions a day; Pro has no daily limit. Background analysis doesn't count toward the 20.

How do I cap my spending?

The AI usage & cost controls section at the bottom of API keys shows what you've spent today, this week and this month. Click Edit limits to set:

  • Daily warning threshold: shows a banner when today's spend passes this amount. It doesn't stop anything. The default is $5.
  • Monthly hard cap: stops AI requests, including background analysis, once this month's spend reaches it. The default is $50; set it to 0 to turn the cap off.

A request that has already started always finishes; the cap stops the next one.

Troubleshooting

Why does the Consistency page say "Fact analysis paused"?

NovelCanon couldn't read your latest scene for facts. The message says which of these it was:

  • The model is unavailable or rejected the request: usually an OpenRouter account with no credit (background analysis needs a few dollars, see above) or a key that was revoked. Add credit, or click Re-verify on API keys.
  • The provider was temporarily unavailable: a rate limit or network problem on the provider's side. Nothing to do; analysis resumes on your next save.
  • Monthly spending cap reached: raise the Monthly hard cap under Edit limits.

Once the cause is fixed, analysis picks up automatically the next time you save the scene.

Why aren't any facts appearing?

Facts appear only for scenes of at least 100 words, and only with a key connected. Check that your scene is long enough, that a key shows Verified ✓ on API keys, and, on OpenRouter, that your account has credit.

Why did AI generation stop working?

  • "You've used today's AI actions": you've reached the 20 daily AI actions on the Free or Manuscript plan. They reset daily, or upgrade to Pro for unlimited AI.
  • A rate limit or "temporarily unavailable" error: free models are shared and often busy. Wait a moment, or pick a paid model under Model for AI operations.
  • "API key was rejected": the key was revoked or expired. Click Re-verify, or Replace it with a new key.
  • "Insufficient credit": top up your account with the provider, or pick a cheaper model.
  • "No longer offers" a model: the provider retired it. Pick a different model under Model for AI operations.
  • "Monthly spending cap reached": raise the cap under Edit limits.
NextImport your manuscript

Still stuck? Contact us and we’ll help.