Back to Blog
AnnouncementsJanuary 30, 2025

Why We Built Token Factory

Ditlev BredahlCo-founder
6 min read

Why We Built Token Factory

When we launched Packet.ai, our mission was simple: make GPU compute accessible to everyone. We started by offering on-demand GPU instances—spin up a VM with an RTX 4090 or H100, pay by the hour, shut it down when you're done.

But as we talked to more customers, we noticed a pattern.

The Problem We Kept Seeing

Developer after developer came to us with the same story: "I'm building an AI product, and my inference costs are killing me."

The typical scenario looked like this:

  • Early stage: Free tier on OpenAI, everything's great
  • Growing: $500/month on GPT-3.5, manageable
  • Scaling: $5,000/month, starting to sweat
  • Success: $50,000/month on API costs alone

At that point, the math stops making sense. If your API costs eat 30-40% of revenue, you don't have a sustainable business. You have a margin problem.

Some tried to solve this by running their own inference. They'd rent GPUs, set up vLLM or TGI, configure load balancing, handle model updates, deal with CUDA driver issues, and monitor for memory leaks.

It worked, but now they had a DevOps problem instead of a cost problem. The complexity overhead was massive—especially for small teams who should be focusing on their product, not on keeping GPU servers healthy.

The OpenAI Lock-In

There's another issue that doesn't get talked about enough: vendor lock-in.

OpenAI's API is excellent. The DX is polished, the models are powerful, and the SDK is a joy to use. But you're completely dependent on their pricing, their rate limits, their terms of service, and their roadmap.

When they sunset a model, you scramble. When they change pricing, you recalculate your unit economics. When they have an outage, your product goes down.

This isn't a criticism of OpenAI—they're running a business and doing it well. But for companies building critical infrastructure on top of AI, single-vendor dependency is a real risk.

What We Wanted to Build

We asked ourselves: what would the ideal solution look like?

  1. OpenAI-compatible: Use the same SDK, same request format, same response structure. Migration should take minutes, not weeks.

  2. Radically cheaper: Not 10% cheaper—10x cheaper. The kind of pricing that changes what's economically viable.

  3. No infrastructure to manage: You shouldn't need to know what vLLM is. You shouldn't need to SSH into GPU servers. You just call an API.

  4. Model diversity: Not locked to one provider's models. Access Llama, Mistral, Qwen, DeepSeek—choose the right model for each task.

  5. Advanced features: Batch processing for async workloads. LoRA fine-tuning for customization. Function calling for structured outputs.

That's Token Factory.

How We Made It Work

The technical details are covered in our deep-dive post, but here's the high-level approach:

Open-source models have caught up. For many tasks, Llama 3.1 8B performs comparably to GPT-3.5. Not for everything—GPT-4 is still king for complex reasoning—but for the vast majority of production use cases, open models are good enough.

vLLM is incredibly efficient. Continuous batching, PagedAttention, and tensor parallelism mean we can serve more requests per GPU than most self-hosted setups. Higher utilization = lower cost per token.

We already have the infrastructure. Running GPU clusters is literally our core business. Adding managed inference was a natural extension—we just exposed what we were already building internally.

We're not margin stacking. The big API providers have multiple layers of margin built in. We're a small team, we run our own hardware, and we're happy with reasonable margins. The savings go to you.

The Numbers

Let me be specific about what "radically cheaper" means:

ProviderPrice per 1M tokens
OpenAI GPT-4o$2.50-$10.00
OpenAI GPT-4o-mini$0.15-$0.60
Token Factory real-time$0.10
Token Factory batch (24h)$0.05

For a company processing 100 million tokens per month:

  • GPT-4o: ~$6,250/month
  • GPT-4o-mini: ~$375/month
  • Token Factory: ~$10/month (real-time) or $5/month (batch)

That's not a rounding error. That's the difference between "we need to raise more money" and "we're profitable."

Who Token Factory Is For

Startups building AI products. You need good-enough quality at sustainable prices. You want to iterate quickly without worrying about your next API bill.

Companies with high-volume workloads. Document processing, content moderation, data extraction, synthetic data generation—anything where you're processing millions of items.

Teams that want optionality. Keep using OpenAI for your flagship features, use Token Factory for cost-sensitive workflows. Having a backup reduces risk.

Developers experimenting. First 10,000 tokens are free. Try it without commitment, see if it works for your use case.

What Token Factory Is NOT

Let me be clear about limitations:

We're not replacing GPT-4 for complex reasoning. For multi-step logic, nuanced analysis, or tasks requiring the absolute best model, OpenAI's frontier models are still superior. Use them when you need them.

We're not promising 100% identical outputs. Different models have different behaviors. You may need to adjust prompts. For most applications this is minor; for some it matters.

We're not a research lab. We're not training foundation models or publishing papers. We're infrastructure people making existing models accessible.

Try It

If you're spending more than $50/month on AI APIs, you owe it to yourself to try Token Factory.

Migration is trivial—change your base URL, use a Packet API key, keep everything else the same. Run your test suite. Compare quality and latency. Do the math.

If it works for your use case, you'll save a lot of money. If it doesn't, you've lost fifteen minutes.

from openai import OpenAI

# That's it. That's the migration.
client = OpenAI(
    base_url="https://dash.packet.ai/api/v1",
    api_key="your-packet-api-key"
)

Get started at dash.packet.ai. First 10,000 tokens are free.


For the technical details—architecture, batch processing, LoRA fine-tuning, and code examples—read our Token Factory Deep Dive.