Skip to content

About

Official React Native and Expo SDK for the Wiro AI API, on npm as @wiro-ai/wiro-react-native: run image, video, audio and LLM models from TypeScript.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Wiro AI

Wiro AI SDK for React Native and Expo

Run image, video, audio and LLM models from React Native and Expo apps in TypeScript with the Wiro AI API: typed requests, live task tracking and file uploads.

npm React Native 0.76+ Expo SDK 54+ CI License: MIT

Website · Models · Docs · Dashboard · npm

@wiro-ai/wiro-react-native is the official TypeScript library for calling the Wiro AI model API from React Native and Expo apps, including Expo Go. It runs any model in the Wiro AI catalog, through typed request factories for popular image, video and music models or through Wiro.model with a parameter map, and follows each task by polling or over a WebSocket. Uploads accept bytes, Blobs, streams and Expo picker URIs.

Features

  • Typed request factories for popular image, video, and audio models
  • Dynamic model requests with Wiro.model("owner/project", parameters)
  • Model search, explore, and schema validation
  • subscribe / run / subscribeStream task lifecycle APIs
  • Automatic uploads for bytes, Blob, stream, and Expo picker URIs
  • Polling and WebSocket task tracking
  • Task cancel / kill
  • Retry with exponential backoff, timeouts, and structured logging
  • API key, HMAC signature, and proxy authentication
  • AbortSignal cancellation and client.close() lifecycle control

Requirements

  • React Native 0.76+
  • Expo SDK 54+ (Expo Go supported)
  • expo-file-system peer dependency
  • Node.js 22.18+ for development
  • A Wiro AI project and API key

Installation

npm install @wiro-ai/wiro-react-native
yarn add @wiro-ai/wiro-react-native
pnpm add @wiro-ai/wiro-react-native
npx expo install expo-file-system

Quick start

import {
  Wiro,
  WiroClient,
  WiroFlux2ProOutputFormat,
} from '@wiro-ai/wiro-react-native';

const client = new WiroClient({ apiKey: 'your-api-key' });

try {
  const result = await client.subscribe(
    Wiro.flux2Pro({
      outputFormat: WiroFlux2ProOutputFormat.png,
      prompt: 'A cinematic mountain lake',
    }),
  );

  if (result.kind === 'success') {
    console.log(result.task.outputs[0]?.url?.toString());
  } else {
    console.log('Failed:', result.reason);
  }
} finally {
  client.close();
}

Mobile tip: Prefer WiroClient({ proxyUrl, headers }) in shipped apps so long-lived API secrets never ship inside the binary.

Authentication

API key

const client = new WiroClient({ apiKey: 'your-api-key' });

API key + HMAC signature

const client = new WiroClient({
  apiKey: 'your-api-key',
  apiSecret: 'your-api-secret',
});

Proxy (recommended for production)

const client = new WiroClient({
  proxyUrl: 'https://api.myapp.com/wiro/v1',
  headers: {
    Authorization: 'Bearer app-token',
  },
});

Your backend attaches Wiro AI credentials server-side. The SDK never stores an API key in proxy mode.

Which call do I need?

I want to... Call
Generate with a supported model client.subscribe(Wiro.flux2Pro(...))
Run any other model client.subscribe(Wiro.model("owner/project", ...))
Fire-and-forget then wait run / runModel, then waitForTask
Stream live status updates subscribeStream(...)
Find a model searchModels / explore
Inspect parameters getModelSchema, then schema.validate
Send bytes / Blob WiroFileInput.bytes(...) / .blob(...)
Send an Expo picker URI WiroFileInput.uri(...)
Stop work AbortSignal, or cancelTask / killTask

Typed and dynamic requests

Category Models
Image FLUX.2 Pro, GPT Image 2, Nano Banana Pro, Seedream v4, Grok Imagine Image
Video Runway Gen-4.5, Seedance 2.0, Kling V3, Veo 3.1, Hailuo 2.3 Fast, Grok Imagine Video
Music Lyria 3
import {
  Wiro,
  WiroFlux2ProOutputFormat,
  WiroValue,
} from '@wiro-ai/wiro-react-native';

// Typed
const request = Wiro.flux2Pro({
  prompt: 'Sunset over the bay',
  outputFormat: WiroFlux2ProOutputFormat.png,
});

// Dynamic
const dynamic = Wiro.model('black-forest-labs/flux-2-pro', {
  prompt: WiroValue.string('Sunset over the bay'),
  width: WiroValue.number(1024),
  height: WiroValue.number(1024),
});

Polling and WebSocket tracking

// Default: polling
const result = await client.subscribe(request, {
  onUpdate(update) {
    console.log(update.status?.apiValue);
  },
});

// WebSocket
const live = await client.subscribe(request, {
  trackingMode: 'webSocket',
});

// Async iterable
const updates = await client.subscribeStream(request);
for await (const update of updates) {
  console.log(update.status?.apiValue);
}

Uploads

Unresolved file inputs inside run parameters are uploaded automatically before /Run.

const image = WiroFileInput.uri(pickerAsset.uri, {
  fileName: pickerAsset.name ?? 'photo.jpg',
  mediaType: pickerAsset.mimeType ?? 'image/jpeg',
  sizeBytes: pickerAsset.size,
});

const result = await client.subscribe(
  Wiro.model('owner/project', {
    image: WiroValue.fileInput(image),
  }),
);

Manual upload helpers:

await client.uploadFile(bytesOrBlob, 'photo.png');
await client.uploadFileFromUri(uri, { fileName: 'photo.png' });
await client.uploadStream(stream, 'video.mp4', { contentLength });

Cancellation

const controller = new AbortController();

const result = await client.subscribe(request, {
  signal: controller.signal,
});

controller.abort();
client.close();

Security guidance

  • Prefer proxy mode in production builds.
  • Never log API keys, secrets, proxy bearer tokens, or raw response bodies.
  • Prefer JSON.stringify(...) on SDK objects; diagnostic fields such as task.raw and error.rawResponseBody are for local debugging only.
  • Do not put production credentials in EXPO_PUBLIC_* environment variables.

Workspace

  • packages/wiro-react-native: publishable @wiro-ai/wiro-react-native package
  • apps/example: Expo Go-compatible iOS and Android example

Package reference: packages/wiro-react-native/README.md

Example app

corepack enable
pnpm install
cp .env.example apps/example/.env

Set EXPO_PUBLIC_WIRO_API_KEY in apps/example/.env for local development. Expo reads .env files from the example app folder, not the repository root. Then start the app:

pnpm --filter @wiro-ai/example start

Agent skill

This repository includes an agent skill, wiro-react-native, in skills/wiro-react-native/SKILL.md. It shows coding agents such as Claude Code, Codex and Cursor how to use this SDK in React Native and Expo apps. Add it to your agent with:

npx skills add wiroai/ReactNative-QuickStart --skill wiro-react-native

Documentation

Development

corepack enable
pnpm install
pnpm format:check
pnpm lint
pnpm typecheck
pnpm build
pnpm test
pnpm test:coverage
pnpm verify:exports

More from Wiro AI

Repository What it is
Wiro-MCP Official MCP server for Wiro AI, @wiro-ai/wiro-mcp on npm
Wiro-LLM Vercel AI SDK provider for chat, images, speech, transcription and video, @wiro-ai/wiro-llm on npm
Wiro-Chromium-Extension Wiro AI extension for Chrome, Edge, Opera and Brave
Wiro-Firefox-Extension Wiro AI add-on for Firefox
Wiro-Safari-Extension Wiro AI extension for Safari on the Mac
Wiro-Plugin Wiro AI plugin for Cursor, Claude Code, Gemini CLI, Devin, Antigravity and Kiro
Wiro-Skills Agent skills for images, image edits, video, music, speech, transcripts, 3D and model search
Swift-QuickStart WiroKit, the Wiro AI SDK for iOS
Kotlin-QuickStart WiroKit, the Wiro AI SDK for Android
Dart-QuickStart Wiro AI SDK for Dart and Flutter, wiro on pub.dev
Swift-Realtime Realtime voice AI example for iOS
Kotlin-Realtime Realtime voice AI example for Android
Dart-Realtime Realtime voice AI example for Flutter
ReactNative-Realtime Realtime voice AI example for React Native
n8n-nodes-wiro One Wiro AI node for n8n with a searchable model picker, @wiro-ai/n8n-nodes-wiro on npm
Wiro-Dify-Plugin Wiro AI plugins for Dify: the LLM gateway as a model provider, plus image, video, speech and music tools
Wiro-ComfyUI Wiro AI nodes for ComfyUI
Wiro-Hermes Wiro AI plugins for Hermes Agent: image, video, audio and 3D tools, plus the LLM gateway as a model provider
Wiro-Zed Wiro AI MCP server extension for Zed
Wiro-Action GitHub Action for Wiro AI models and the LLM gateway, on the GitHub Marketplace
Wiro-Raycast Wiro AI extension for Raycast: image and video generation, LLM chat and model search
Wiro-WordPress Wiro AI plugin for WordPress: featured images, image edits, alt text, narration and SEO suggestions
Wiro-Obsidian Wiro AI plugin for Obsidian: images, video, speech, music, transcription and text tools
Wiro-Blender Wiro AI add-on for Blender: text to 3D, image to 3D and textures
Wiro-Figma Wiro AI plugin for Figma: images, vectors, image edits and text
Wiro-Next-Starter Next.js starter for Wiro AI: Playground, image, video and audio tools, and LLM chat, ready for Vercel and Railway
Wiro-Docs Source of the Wiro AI API docs
wiroai.github.io Every open-source project from Wiro AI on one page, with a page for each repository

Website · Models · Docs · X

License

MIT. See LICENSE.

Wiro AI koala mascot

About

Official React Native and Expo SDK for the Wiro AI API, on npm as @wiro-ai/wiro-react-native: run image, video, audio and LLM models from TypeScript.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages