Wiro AI for React Native
БесплатноБез исполняемых скриптовНе проверенRun Wiro AI models from React Native and Expo apps with the official @wiro-ai/wiro-react-native SDK, covering a backend proxy for credentials, typed and…
от wiroai188 установок в других каталогахОб этом скилле
Wiro AI for React Native and Expo
@wiro-ai/wiro-react-native is the official TypeScript SDK for the Wiro AI model API in React Native and Expo apps, Expo Go included. It runs any model in the Wiro catalog through typed request factories or Wiro.model, uploads files, and follows each run (a task) by polling or over a WebSocket.
Install
npm install @wiro-ai/wiro-react-native
npx expo install expo-file-system
- Requires React Native 0.76+ and Expo SDK 54+. Expo Go works. Bare React Native apps must have Expo Modules configured.
- Peer dependencies:
react-native,expoandexpo-file-systemfor Expo SDK 54 to 58 (npx expo installpicks the version for your Expo SDK).yarn addandpnpm addwork too.
Credentials and the client
Long-lived Wiro API keys and secrets never ship inside an app binary. In a shipped app, use proxy mode: the app calls your backend, and the backend attaches the Wiro credentials server-side. The SDK never stores an API key in proxy mode.
import { WiroClient } from '@wiro-ai/wiro-react-native';
const client = new WiroClient({
proxyUrl: 'https://api.example.com/wiro',
headers: { Authorization: `Bearer ${sessionToken}` }, // your app's own user token, not a Wiro key
});
- The SDK sends the Wiro REST paths it uses (such as
/Run/{owner}/{project},/Task/Detailand/File/Upload) toproxyUrlwith yourheaders. The backend adds the Wiro credentials and passes each call on to Wiro. proxyUrlmust use HTTPS. Plain HTTP is accepted only for loopback hosts such aslocalhostduring development.
For local development only, a key from an uncommitted env file is fine. The example app reads EXPO_PUBLIC_WIRO_API_KEY from .env, which .gitignore excludes, and commits only .env.example. Never put production credentials in EXPO_PUBLIC_* variables.
// API key only (local development)
const apiKey = process.env.EXPO_PUBLIC_WIRO_API_KEY?.trim() ?? '';
const devClient = apiKey.length > 0 ? new WiroClient({ apiKey }) : null;
// Key plus secret (local development only): the SDK signs each request with HMAC
const signedClient = new WiroClient({
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SECRET',
});
- Match the project's auth method: add
apiSecretfor a Signature-Based project and leave it out for an API Key Only project. Projects and keys are created at https://wiro.ai/panel/project/new. Never ask the user to paste a key or secret into the chat. - Create one client and close it when you are done. A closed client cannot be reused. In a component:
const client = useMemo(() => new WiroClient({ proxyUrl, headers }), []);
useEffect(() => () => client.close(), [client]);
Run a model
Typed factories check parameters at compile time for FLUX.2 Pro, GPT Image 2, Nano Banana Pro, Seedream v4, Grok Imagine Image, Runway Gen-4.5, Seedance 2.0, Kling V3, Veo 3.1, Hailuo 2.3 Fast, Grok Imagine Video and Lyria 3 (Wiro.flux2Pro, Wiro.gptImage2, Wiro.veo31 and so on). subscribe starts the run, follows the task and resolves when it ends. Tell the user the expected cost first (see Money rules).
import { Wiro, WiroFlux2ProOutputFormat } from '@wiro-ai/wiro-react-native';
const result = await client.subscribe(
Wiro.flux2Pro({
prompt: 'A cinematic mountain lake at sunrise',
outputFormat: WiroFlux2ProOutputFormat.png,
}),
{ onUpdate: (update) => console.log(update.status?.apiValue) },
);
if (result.kind === 'success') {
for (const output of result.task.outputs) console.log(output.url?.toString());
} else {
console.log('Failed:', result.reason);
}
Any other catalog model runs through Wiro.model('owner/project', parameters) with WiroValue values. Find the slug and the parameter names at https://wiro.ai/models, or in code:
import { Wiro, WiroModelId, WiroValue } from '@wiro-ai/wiro-react-native';
const models = await client.searchModels({ search: 'text to speech' });
const schema = await client.getModelSchema(new WiroModelId('owner', 'project'));
const request = Wiro.model('owner/project', {
prompt: WiroValue.string('Hello from my app'),
});
const problems = schema.validate(request.parameters()); // empty when the request is valid
const speech = await client.subscribe(request);
- A search result's
modelIdis what you pass togetModelSchema.schema.parameterslists each input'sname,kindandisRequired. - Tracking: polling is the default. Pass
trackingMode: 'webSocket'for live events, or callawait client.subscribeStream(request)and read the updates withfor await. - Outputs:
result.task.outputsholds items withurl,contentType,nameandisImage,isVideo,isAudioorisText. For LLM models the merged reply text is intask.debugOutput, and the text output'scontenthasrawText,answersandthinking. task.totalCostis the amount charged for the run.
Files
File inputs are uploaded automatically before the run. `WiroFil
Установить Wiro AI for React Native в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Wiro AI for React Native?
Run Wiro AI models from React Native and Expo apps with the official @wiro-ai/wiro-react-native SDK, covering a backend proxy for credentials, typed and catalog model requests, file uploads, task tracking, cancellation and errors. Use it when a React Native or Expo app needs to generate images, video, speech, music or LLM output with Wiro.
Как установить скилл Wiro AI for React Native?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Wiro AI for React Native запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic