AIProxyTeam/AIProxySwift

Swift clients for AI providers. You can make requests straight to the provider or proxied through our abuse protection backend

What it solves

AIProxySwift provides a unified Swift library for integrating multiple AI providers into iOS and macOS applications. It solves the security risk of exposing API keys in client-side code and the complexity of managing multiple different AI SDKs by offering a standardized interface and an optional secure proxy backend.

How it works

The library provides Swift clients for a wide array of providers (including OpenAI, Gemini, Anthropic, and others). Developers can choose between two modes of operation:

  1. Direct Service: Requests go straight to the provider, suitable for prototyping or "Bring Your Own Key" (BYOK) apps.
  2. AIProxy Backend: Requests are routed through the AIProxy backend, which applies five layers of security: certificate pinning, DeviceCheck verification, split key encryption, and per-user and per-IP rate limits.

Who it’s for

Swift developers building AI-powered apps for Apple platforms who want to easily switch between AI providers while keeping their API keys secure and managing costs.

Highlights

  • Broad Provider Support: Includes clients for OpenAI, Gemini, Anthropic, Stability AI, DeepL, Together AI, Replicate, ElevenLabs, Fal, Groq, Perplexity, Mistral, EachAI, OpenRouter, DeepSeek, Fireworks AI, and Brave.
  • Enterprise-Grade Security: Optional proxying with certificate pinning and split key encryption to prevent key theft.
  • Cost Control: Built-in per-user and per-IP rate limiting via the AIProxy backend.
  • Multi-modal Capabilities: Supports text chat, streaming responses, and image generation/editing (e.g., DALL-E 3).
  • Developer Friendly: Integrates via Xcode Package Manager or CocoaPods.

Related

  • Project
  • Project
  • Project
  • Project
  • Project