The Factual Library

Ship code faster with an AI pair programmer

Debug, refactor, and explain code across every major language.

Use it for a quick fix, a whole feature, or to talk a design through before you write any code.

No credit card required Pay per token No subscription
the-factual-library / chat
Why is this query slow on a large table?

AI Chat

Debug, refactor and write code in most mainstream languages.

AI Video Studio

Generate a short video from a prompt, with optional voice.

AI Image Studio

Generate icons, diagrams, product images and illustrations.

Models currently available. Pick one per conversation

GPT-4o Claude Sonnet 5 GPT-4o Mini Claude Haiku 4.5 GPT-5 Claude Opus 5 GPT-5 Mini GPT-4o Claude Sonnet 5 GPT-4o Mini Claude Haiku 4.5 GPT-5 Claude Opus 5 GPT-5 Mini
How it works

How a typical session goes

Nothing to install. Open a chat and paste what you have.

01

Paste the problem

An error message, a screenshot, or a short description of what you're building.

02

Read the answer

A fix, an implementation or an explanation, based on the code and error text you gave it.

03

Keep going in the same thread

Follow-up questions see the earlier messages, so you don't have to repeat yourself.

Capabilities

What it does

Chat, plus image and video generation, on one token balance.

Code generation

Working code in most mainstream languages and frameworks. Review it like any other pull request.

Debugging & refactoring

Paste a stack trace or a messy function. You get a fix and an explanation of what was wrong.

Attachments

Attach screenshots, logs or files to a message instead of retyping them.

Model choice

Switch between OpenAI and Anthropic models per conversation.

Projects

Group chats under a project. Its instructions apply to every chat inside it.

Chat history

Every thread is saved, and you can search past threads by title.

Any stack

Bash one-liners to multi-service architecture. No restrictions on language or framework.

Long output

If a reply hits the model's output limit, it picks up where it stopped (up to four times).

Works from your input

Answers are based on the code and error text you paste in. Test them before you ship.

Video generation

Generate a short clip from a prompt, with optional generated voice and sound.

Image generation

Generate images, icons and diagrams from a description. Most finish in under a minute.

Examples

Typical requests

React Native: push notifications arrive on Android but never on iOS in release builds. Debug builds work fine.
That pattern usually points at APNs setup. Check that the aps-environment entitlement is production in the release profile, and register for remote messages before asking for a token:
await messaging().registerDeviceForRemoteMessages();
const token = await messaging().getToken();
Our Node image is 1.4 GB. Can this Dockerfile be a multi-stage build?
Split it into a build stage and a runtime stage, so dev dependencies and source files never reach the final image:
FROM node:20 AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
CMD ["node", "dist/server.js"]
This report query takes 14s. EXPLAIN ANALYZE output is below.
The plan does a sequential scan on orders and then sorts on disk. One composite index covers both the filter and the ORDER BY:
CREATE INDEX CONCURRENTLY idx_orders_user_created
  ON orders (user_id, created_at DESC);
Add pagination to this API endpoint, 20 per page
Cursor-based, since the table is append-only and offset pages would shift under concurrent writes:
$items = Item::where('id', '>', $cursor)
    ->orderBy('id')->limit(20)->get();

Image and video generation

Generate images and short videos from the same account and token balance as chat.

Video

Generate a short clip from a text prompt: product demos, explainers, social clips.

  • Set the duration (4-12s) and orientation: landscape, portrait or square
  • Optional generated voice and ambient audio, off by default
  • Preset prompts in 5 categories, or have the model tighten your own draft
  • Track and download every generation from your gallery

"A product demo of a smartwatch, studio lighting, slow rotation"

Images

Generate images from a description: product shots, illustrations, icons, diagrams.

  • Pick the size (square, landscape or portrait) and quality level
  • Preset prompts in 5 categories: product, illustrations, marketing, icons, UI mockups
  • The prompt enhancer rewrites a rough idea into a specific description
  • Usually ready in under a minute. Download from your gallery

"Isometric diagram of a three-tier web app, flat colors, white background"

Use cases

When it helps

Situations where a second opinion saves time.

Stuck on a bug for hours

Paste the error and the relevant code. Get a diagnosis and a fix to test.

A feature is due tomorrow

Describe the behavior you want and get an implementation to adapt.

Learning an unfamiliar stack

Ask questions about your own code instead of translating generic docs.

Explaining a decision to your team

Get a plain-language write-up of what the code does and why.

Projects

Keep each codebase in its own project

Set instructions once per project, such as your stack, conventions and things to avoid. Every chat in the project starts with them, and old threads stay in your history so you can pick them back up.

Create an account
Project: Mobile app rewrite
Set up the navigation structure
Fix the auth token refresh bug
Add offline caching for the feed

Chats in this project share its instructions.

Comparison

Compared with a general-purpose chatbot

General chatbot
The Factual Library
Built around coding workflows
Switch between OpenAI and Anthropic models
Projects with shared instructions
Accepts screenshots and error logs
Continues long output automatically
Generates images and video
About The Factual Library

Who runs this

The Factual Library puts AI chat, image generation and video generation in one account, so you don't need a separate tool and subscription for each.

We're a small, independent team and we use it for our own work. Tokens are charged when a request completes, and your balance doesn't expire.

Your work stays yours

Sharing or selling a creation on the community feed is always opt-in.

Prepaid tokens

No subscription. Your balance doesn't expire.

Charged on completion

Failed generations aren't charged.

Feedback reaches us

Report a bug or request a feature from inside the app.

FAQ

Questions

What is a token?

The platform's usage unit. Each request is billed from its input and output size at the selected model's rate, so long threads and long code replies cost more.

Do tokens expire?

No. Your balance stays until you spend it.

Which models are available?

The OpenAI and Anthropic models that are currently enabled. You can change the model per conversation, including partway through a thread.

Is there a free trial?

New accounts get 5 free chats. No card needed.

What are projects?

A project groups related chats and holds instructions that apply to all of them.

What happens when a reply hits the length limit?

It continues automatically, up to four times. Very long output can still end early, so check the end of any generated file.

Can I attach files?

Yes. Attach screenshots, logs or other files to a message. Images need a vision-capable model, so another model is used if the selected one can't read them.

Can it generate images and video?

Yes. Both use the same token balance as chat.

How are generations billed?

Tokens are charged when a generation finishes. Failed generations aren't charged.

Try it on your next bug

5 free chats, no card needed.

Create an account