Building a side project that relies on artificial intelligence often starts with a series of tedious steps: generating API keys for multiple providers, storing them securely, writing custom wrappers, and setting up separate billing dashboards. For many developers, this setup overhead can delay or even derail the creative process.
That frustration led to the creation of Apiarium, a new service designed to eliminate the repetitive setup rituals that burden solo developers and small teams. Instead of managing multiple provider accounts and adapters, users can now access a unified API with a single key and a straightforward credit-based pricing model. Apiarium currently supports major large language models from OpenAI and Anthropic, with expanded capabilities planned for image generation, text-to-speech, and transcription services.
Why a new solution emerged
Projects like LiteLLM and OpenRouter already exist in the space, offering flexible ways to interact with multiple AI providers. However, Apiarium’s creator sought a more opinionated approach tailored to a specific audience: developers working on side projects who prioritize simplicity and predictability over scalability.
Key differentiators include:
- Credit-based billing: Users pay using a single credit unit applied uniformly across all supported models, removing the complexity of token-by-token pricing.
- Unified API surface: Text, image, speech, and transcription endpoints follow the same structure, regardless of the underlying provider.
- Self-hosting option: Developers who prefer full control can deploy Apiarium’s backend on their own infrastructure.
- Simplified pricing tiers: No per-model complexity; all costs are transparent and consolidated.
The goal isn’t to replace enterprise-grade AI infrastructure but to reduce friction for developers who want to focus on building rather than infrastructure management.
How the unified API works
Apiarium presents a consistent interface to clients, abstracting away provider-specific details. The architecture routes requests to the appropriate provider while maintaining a normalized response format. Currently, the service supports endpoints for:
- LLMs: OpenAI models like
gpt-4o-miniand Anthropic’sclaude-haiku - Image generation: Early support for providers like
gpt-image-1 - Text-to-speech: Integration with services such as OpenAI’s TTS and upcoming ElevenLabs
- Transcription: Whisper-based services for converting audio to text
Adding new providers doesn’t alter the API contract. Clients continue using the same endpoints, authorization headers, and payload structures, while Apiarium handles provider-specific quirks behind the scenes.
The following example demonstrates how a developer can switch between models without changing any client-side code:
# Request using GPT-4o-mini
curl -X POST \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
# Same request, same endpoint, switching to Claude
curl -X POST \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"claude-haiku","messages":[{"role":"user","content":"Hello"}]}'Behind the scenes: technical choices
The development process revealed several design challenges, particularly around consistency and maintainability. Apiarium’s architecture addresses these with three core principles:
Credit-based accounting
Rather than charging per token or model, Apiarium uses a credit system where costs scale predictably. For example:
- Text generation: 1–20 credits per request, depending on the model
- Image generation: 100 credits per image
- Text-to-speech: 10 credits per 1,000 characters
This approach ensures users always know their spending without deciphering complex pricing tables.
Standardized error handling
AI providers return errors in wildly different formats. Apiarium normalizes these responses to a consistent schema:
{
"error": "Rate limit exceeded. Try again in 30 seconds.",
"code": "rate_limit_exceeded",
"retry_after": 30
}This consistency simplifies client-side error handling and improves debugging.
Provider abstraction layer
Each provider is implemented as an adapter that converts provider-specific responses into a standardized internal format. This modular design means adding support for a new model or provider primarily involves writing a new adapter, without overhauling the core API.
Lessons from the build
If the project were to restart today, the creator would prioritize designing the provider abstraction layer earlier. The initial approach of adding providers incrementally led to repeated refactoring to handle streaming responses, token accounting, and edge cases across different models. A well-defined abstraction from the outset would have streamlined development and reduced technical debt.
Looking ahead
Apiarium launched publicly in early 2025, with the infrastructure reportedly stable and all endpoints operational. The creator has expressed particular interest in gathering feedback from developers who face similar frustrations with multi-provider AI integrations.
While still in its early stages, the service represents a tangible effort to reduce the overhead that often discourages experimentation. If even a fraction of developers find themselves copying and pasting yet another ai-utils.js file, Apiarium’s mission will have succeeded.
AI summary
Farklı yapay zeka sağlayıcılarını tek bir API altında toplayan Apiarium, geliştiricilerin karmaşık API kurulumlarından kurtulmasını sağlıyor. Kredi tabanlı basit faturalandırma ve normalize hata yapılarıyla projelerinizi hızlandırın.