Vendo SDKs
Getting started

Swift quickstart

Add the Vendo Swift package and fetch your first token in 5 minutes.

Install

In your Package.swift:

// swift-tools-version: 5.9
import PackageDescription

let package = Package(
    name: "MyApp",
    platforms: [.iOS(.v15), .macOS(.v12)],
    dependencies: [
        .package(
            url: "https://github.com/runvendo/vendo-sdk-swift",
            from: "1.0.0"
        ),
    ],
    targets: [
        .target(
            name: "MyApp",
            dependencies: ["Vendo"]
        ),
    ]
)

Requirements: iOS 15+, macOS 12+, tvOS 15+, watchOS 8+, Swift 5.9+.

OSS mode (no account needed)

Set the conventional env var for each integration. In Xcode schemes or your process environment:

OPENAI_API_KEY=sk-...
TELEGRAM_BOT_TOKEN=12345:abcde
import Vendo

// In BYOK mode pass any non-empty string as apiKey
let vendo = try Vendo(apiKey: "byok")

let openaiKey = try await vendo.token("openai")   // reads OPENAI_API_KEY
let botToken  = try await vendo.token("telegram") // reads TELEGRAM_BOT_TOKEN

Vendo mode (OAuth refresh + managed keys)

Set VENDO_API_KEY in the environment:

VENDO_API_KEY=vendo_sk_...
import Vendo

let vendo = try Vendo() // reads VENDO_API_KEY from env

let openaiKey   = try await vendo.token("openai")
let connections = try await vendo.connections.list()
let balance     = try await vendo.billing.balance()

Bulk tokens

let tokens = try await vendo.tokens(["openai", "anthropic", "slack"])
// ["openai": "sk-...", "anthropic": "sk-ant-...", "slack": "xoxb-..."]

Next steps

On this page