Command Palette

Search for a command to run...

Назад к скиллам
скилл № 77311

Wiro AI for Swift

Build iOS and SwiftUI apps with WiroKit, the official Wiro AI Swift SDK, from Swift Package Manager setup and proxy, API key or signature auth to typed and…

БесплатноБез исполняемых скриптов
wiroaiот wiroai199 установок в других каталогах

Установить Wiro AI for Swift в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

WiroKit, the Wiro AI Swift SDK

WiroKit is the official Swift package for calling the Wiro AI model API from iOS apps. It runs any of the 1,000+ models in the Wiro catalog through typed request factories or Wiro.model, follows each task by polling or WebSocket, and uploads device files for you. It is written in Swift 6 with async/await and has no third-party dependencies.

Money rules

Successful model runs are billed to the user's Wiro project. These rules cover the calls you make and the app code you write.

  • Before you run a model yourself (a test call, the example app, a script), tell the user the model, the settings and the expected cost. Prices are on each model's page at https://wiro.ai/models and at https://wiro.ai/product/pricing.
  • Ask before large or open-ended jobs: many outputs, long videos, loops or batch scripts.
  • After a timeout or a dropped connection, never resubmit the same run blindly, because that bills a second job. Look the task up first with getTask or waitForTask and the token you kept (or getTaskByID). With no token at all, ask the user to check their usage history at https://wiro.ai/panel/billing before you run again.
  • Cancel or kill a task only when the user asks. In an app, that means the user tapped a control for it.
  • WiroKit never retries runs or uploads on its own. Do not add automatic retries for them, and do not restart a billable run after an app relaunch unless the user taps Generate again.

Install

Requirements: iOS 17+, Swift 6 (Xcode 16 or later) and a Wiro project with an API key from https://wiro.ai/panel/project/new.

dependencies: [
    .package(url: "https://github.com/wiroai/Swift-QuickStart.git", from: "0.1.0"),
],

Then link the WiroKit product to the app target. In Xcode, choose File > Add Package Dependencies..., enter the repository URL and link WiroKit.

Create a client

Long-lived Wiro secrets never ship inside the app binary. Shipped apps use proxy mode: your backend attaches the Wiro credentials server-side, and the SDK stores no API key.

import WiroKit

let client = try WiroClient(
    proxyURL: URL(string: "https://api.example.com/wiro/v1")!,
    headers: ["Authorization": "Bearer \(sessionToken)"] // your app's own user session
)
  • Each REST call goes to proxyURL plus the API path the SDK would call on Wiro (such as /Run/{owner}/{project}, /Task/Detail or /File/Upload). The backend forwards it to https://api.wiro.ai/v1 and adds the project credentials (headers in https://wiro.ai/docs/authentication).
  • Task WebSocket tracking still connects directly to Wiro, using a per-task token instead of a key.

The API key modes are for local development and the example app:

let client = try WiroClient(apiKey: "YOUR_API_KEY")
// Signature project: sends x-api-key, x-nonce and an HMAC-SHA256 x-signature
let signed = try WiroClient(apiKey: "YOUR_API_KEY", apiSecret: "YOUR_API_SECRET")
  • The credentials must match the authentication method chosen for the Wiro project.
  • Never hard-code or commit credentials, and never log keys, secrets, proxy tokens or raw response bodies.
  • WiroClient is an actor, so every call is awaited. Both initializers also take pollInterval, requestTimeout, retryPolicy and logger.

Run a model

let result = try await client.subscribe(
    Wiro.flux2Pro(prompt: "A cinematic mountain lake", width: 1024, height: 1024)
)

switch result {
case .success(let task):
    print(task.outputs.first?.url as Any)
case .failure(let task, let reason): // .cancelled, .nonZeroExit or .other
    print("Failed:", reason, task.status)
}

Typed factories (type Wiro. in Xcode): image flux2Pro, gptImage2, nanoBananaPro, seedreamV4, grokImagineImage; video runwayGen45, seedance20, klingV3, veo31, sora2Pro, hailuo23Fast, grokImagineVideo; music lyria3. They check required parameters and options at compile time and throw WiroError.validation when a value is out of range.

Any other catalog model, speech and LLMs included, runs through Wiro.model with its owner/project slug. Read the schema first:

let page = try await client.searchModels(search: "text to speech")
let ids = page.items.compactMap(\.modelID) // or copy a slug from https://wiro.ai/models

let schema = try await client.getModelSchema(WiroModelID(parsing: "owner/project")!)
let parameters: WiroJSON = ["prompt": "Hello from my app"]
let problems = schema.validate(parameters) // [] when the parameters fit
let result = try await client.subscribe(Wiro.model("owner/project", parameters: parameters))

schema.parameters lists each input's name and isRequired, and schema.model.approximateCost is Wiro's approximate cost for the model.

Where the results are:

  • task.outputs holds WiroTaskOutput values: url for generated files, contentType, and isImage, isVideo, isAudio, isText.
  • Text and LLM output: task.outputs.first?.content?.rawText
Полный SKILL.md на ClawHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Wiro AI for Swift?

Build iOS and SwiftUI apps with WiroKit, the official Wiro AI Swift SDK, from Swift Package Manager setup and proxy, API key or signature auth to typed and catalog model runs, file uploads, task tracking, cancellation and errors. Use when Swift code needs to generate images, video, music, speech or LLM output with Wiro in an iOS app.

Как установить скилл Wiro AI for Swift?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Wiro AI for Swift запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Wiro AI for Swift с