DeepSeekKit

A modern Swift SDK for integrating DeepSeek's powerful AI models into your applications

Build Intelligent Apps

Everything you need to create AI-powered Swift applications

🔒

Type-Safe API

Leverage Swift's type system for compile-time safety and better developer experience with full autocomplete support.

Native Streaming

Platform-optimized streaming with URLSession for Apple platforms and cURL for Linux. Real-time responses out of the box.

🧠

Reasoning Model

Access DeepSeek's reasoning model for transparent problem-solving with step-by-step explanations.

🛠️

Function Calling

Build AI agents that can interact with your code. Define tools and let the AI orchestrate complex workflows.

💻

Code Completion

Fill-in-Middle support for intelligent code completion with context awareness from both prefix and suffix.

📦

Zero Dependencies

Pure Swift implementation with no external dependencies. Clean, maintainable, and easy to integrate.

import DeepSeekKit

let client = DeepSeekClient(apiKey: "your-api-key")

// Simple chat completion
let response = try await client.chat.createCompletion(
    ChatCompletionRequest(
        model: .chat,
        messages: [.user("Explain quantum computing in simple terms")]
    )
)

// Streaming responses
for try await chunk in client.chat.createStreamingCompletion(request) {
    print(chunk.choices.first?.delta.content ?? "")
}

Multi-Platform Support

Build once, deploy everywhere

📱
💻
📺
🥽
🐧