🌗
The Library of Unwritten Books
More stories than stars in the sky

To use The Library you need access to a large language model (LLM). We're calling the credentials for this access your "library card."

Use your own LLM Provider (Library Card)

If API Key below is empty, text of your stories is being passed to OpenAI over the site author's business account but only until it uses up a small monthly budget. If, however, you provide your own API endpoint and API key, your text will be passed to the LLM provider maintaining that endpoint, and you can keep using the library even after the monthly limit is hit. If you have no idea what a base or API key are, see the section below.

API Endpoint: 
API Key: 
Model Override: 
Reasoning Effort: 
Verbosity: 

This site stores your library-card settings and current story in your browser's localStorage, and can preserve an active conversation in sessionStorage. This isn't shared with the site's author. However, someone with access to your browser may be able to see this data. To clear both storage areas and return Home, click remove my saved data.

Enter a complete endpoint URL and its model name. URLs ending in /chat/completions support OpenAI-compatible services (including Google Gemini and local LM Studio); /responses uses OpenAI's Responses API; /messages uses Anthropic's native Messages API. Leave Model Override blank to use each story template's original model, or set it to use the same newer/local model throughout the story. Reasoning Effort and Verbosity are optional and sent only to compatible direct OpenAI APIs.

LM Studio: Keep #lmstudio at the end of its Chat Completions URL, for example http://localhost:1234/v1/chat/completions#lmstudio. This preserves the Library's per-prompt JSON schemas and the text-response wrapper required by its current LM Studio setup. Leave the API key blank for a local server that does not require one, and enable CORS in LM Studio. JSON dialogue may contain double quotation marks: the Library preserves escaped quotes when parsing story output.

Story context: The Library sends the full saved story to the model by default, without any proactive length limit. Only if the model explicitly rejects a request because its context window is too small will the Library retry with a shorter copy of the story inside that request. The original opening and most recent passages are preserved along with all surrounding instructions, questions, and JSON output requirements. Your saved story is never shortened. If even the shortened requests do not fit, the Library stops rather than dropping story text silently; you can manually shorten the story or choose a model with a larger context window.

So you need an API key?

You can access the Library with a number of LLM providers, as long as they use the same syntax as the OpenAI API. For example, you could download LM Studio and point to a local LLM ensuring your stories stay on your computer. However, for simplicity's sake, we will only walk through how to set up OpenAI credentials here.

If you need an OpenAI account, you can create one here. When you create a new OpenAI account, you are given a limited amount of free API credits. If you created an account some time ago, however, these may have expired. If your credits have expired, you will need to enter a billing method before you can use the API. You can check the state of any credits here.

Login to OpenAI, and navigate to the API documentation.

Once you are looking at the API docs, follow the steps outlined in the image above. That is:

  1. Select "API keys" from the left menu
  2. Click "+ Create new secret key"

After solving a puzzle to prove you're human, you will be provided with your API key. Use this and the "API Endpoint" https://api.openai.com/v1/chat/completions above.

If you receive an error when trying to use your key, make sure to check the state of any credits here. If you don't have any credits, you will need a billing method on file with OpenAI.


Questions or comments? I'm on Bluesky @davidcolarusso.com