Wiro AI

Next.js starter for Wiro AI

Images, video, audio and chat in one Next.js app

Run any of the 1,000+ models in the Wiro AI catalog from a form built from the model’s own inputs, and see the price before each run. Every call goes through a route handler, so your API key stays on the server.

PlaygroundBrowse the catalog by category or search it, then run any model. The form is built from the model’s own inputs.ImageGenerate, edit with a prompt, upscale and remove backgrounds. Send any result on to the next tool.VideoText to video and image to video with Seedance, Kling, Veo and more, with each stage of the task shown.AudioSpeech in the voice you pick, music from a description, and transcripts of your audio files.ChatEvery chat model on the Wiro LLM gateway, streamed with the AI SDK and @wiro-ai/wiro-llm, with the cost of each reply.HistoryYour recent runs with their outputs and costs, kept in this browser. Runs still going update on their own.

How it works

The browser only talks to this app. Route handlers call Wiro AI with the key from WIRO_API_KEY.

  • app/api/modelsLists a category of the Wiro AI catalog (Tool/List).
  • app/api/models/[owner]/[project]Reads one model’s inputs and price list (Tool/Detail).
  • app/api/runsChecks the form against the model’s inputs, prices the run and starts it (POST /Run).
  • app/api/tasks/[token]Reads the task’s stage, outputs and cost (Task/Detail).
  • app/api/uploadsStores a file from the browser for a run (File/Upload).
  • app/api/chatStreams a reply from the Wiro LLM gateway with streamText.
Starting a run
// app/api/runs/route.ts, shortened
const model = await getModel('pruna/p-image');        // Tool/Detail
const built = buildParams(model.params, values);      // checked against the schema
const price = quote(model.pricing, built.params);     // as Wiro bills it
const { token } = await runModel(model.id, built.params); // POST /Run

// The browser then polls /api/tasks/{token} for the stage and the outputs.