Real-World Pricing Examples

See exactly how credits are used in different types of conversations.

Quick Question

A simple question about a coding concept

0.55 credits

150 input + 400 output tokens

You

What is the difference between useMemo and useCallback in React?

AI

useMemo and useCallback are both React hooks for optimization, but they serve different purposes: **useMemo** memoizes a computed value... **useCallback** memoizes a function definition...

Code Review

Reviewing a function and suggesting improvements

2 credits

800 input + 1,200 output tokens

You

Can you review this authentication function and suggest improvements? ```typescript function auth(user, pass) { if(users[user] === pass) return true return false } ```

AI

I see several security concerns with this authentication function: 1. **Plain text passwords** - Never store passwords as plain text... 2. **Timing attacks** - Direct comparison allows timing analysis... 3. **No input validation** - Missing validation on user and pass... Here's an improved version...

Architecture Discussion

Multi-turn conversation about system design

6 credits

2,500 input + 3,500 output tokens

You

I'm designing a real-time collaboration feature for our document editor. What architecture would you recommend?

AI

For real-time collaboration, I recommend considering these patterns: **1. Operational Transformation (OT)** - Used by Google Docs... **2. CRDTs (Conflict-free Replicated Data Types)** - Used by Figma...

You

We're leaning towards CRDTs. What's the best way to implement this with our existing PostgreSQL database?

AI

Great choice! Here's how to integrate CRDTs with PostgreSQL: **Hybrid approach:** 1. Use PostgreSQL as the source of truth... 2. Implement Yjs or Automerge for real-time sync...

With Knowledge Injection

Using compacted past knowledge for context

2.5 credits

1,500 input + 1,000 output tokens

Injected Context

[Injected context from previous conversation about authentication system - 500 tokens compacted from 2000]

You

Based on our previous discussion about the authentication system, how should I implement the password reset flow?

AI

Based on your existing auth architecture using JWT tokens and PostgreSQL, here's how to implement password reset: **1. Generate Reset Token** ```typescript const resetToken = crypto.randomBytes(32).toString("hex") ``` **2. Store with expiry**...

Knowledge reuse savings: Injected context cost only 0.5 credits (compacted from ~2.0 credits worth of raw tokens)

Model Pricing

Credits are based on underlying model costs plus platform overhead.

ModelInput CostOutput Cost~Credits/1K tokens
Claude 3.5 Sonnet$3.00/M tokens$15.00/M tokens~0.5-2 credits
GPT-4 Turbo$10.00/M tokens$30.00/M tokens~1-3 credits
Claude 3 Haiku$0.25/M tokens$1.25/M tokens~0.1-0.3 credits