ProxyKit LogoProxyKit Docs
Getting Started

Introduction

Secure AI API access with device attestation

ProxyKit protects your AI API keys by verifying requests come from your legitimate mobile apps using device attestation.

The Problem

// ❌ API keys in mobile apps are vulnerable
let openAI = OpenAI(apiKey: "sk-...")  // Easily extracted!

The Solution

// ✅ ProxyKit handles authentication securely
let response = try await AIProxy.openai.chat.completions.create(
    model: "gpt-4",
    messages: [.user("Hello")]
)

How It Works

ProxyKit acts as a secure proxy between your mobile app and AI providers:

  1. Your App makes a request to ProxyKit SDK
  2. SDK performs device attestation to prove app identity
  3. ProxyKit API verifies the attestation with Apple/Google
  4. Verified requests are proxied to OpenAI/Anthropic
  5. AI response is returned through ProxyKit
  6. Your app receives the response securely

Key Features

🔐 Device Attestation

  • iOS App Attest verification
  • Android Play Integrity (coming soon)
  • Cryptographic proof of app identity

🚀 Simple Integration

Choose between two integration styles:

SecureProxy - Context-aware conversations:

// Configure once
SecureProxy.configure(appid: "app_xxx")

// Create chat instance
let chat = SecureProxy(model: .openai(.gpt4))
let response = try await chat.chat(message: "Hello!")

AIProxy - Full API control:

// Configure once
try AIProxy.configure()
    .withAppId("app_xxx")
    .build()

// Direct API calls
let response = try await AIProxy.openai.chat.completions.create(
    model: "gpt-4",
    messages: [.user("Hello!")]
)

💰 Cost Protection

  • No exposed API keys
  • Per-app usage tracking
  • Automatic rate limiting

🌊 Full Feature Support

  • Chat completions
  • Streaming responses
  • Multiple AI providers
  • All model parameters