OIP system: WAI
WAI
A generated article for one OIP shelf. It lists every operation in this API/CLI/MCP/device/model/core subsystem, links each leaf article, and gives the ledger path for proof.
This page is the operating article for one build subsystem. It is generated from live directory rows. If a task belongs to this subsystem, scan the operations below, open the matching capability article, run only the exact object named there, and verify by receipt.
Kind: core. Capabilities: 4. Machine system map: /api/dispatch?map=WAI&format=markdown. Root: /a/oip.
Operations
WAI_RUN
Run a Workers AI model via the env.AI binding. $1=model id (e.g. @cf/meta/llama-3.3-70b-instruct), $2=user prompt. Returns the raw JSON from env.AI.run Use when: you need to wai run Arguments: $1 | $2. Human article: /a/oip-capability-wai-run. Machine doc: ?key=WAI_RUN&format=markdown. Invocation history: /api/invocations?object_id=WAI_RUN.
WAI_EMBED
Compute embedding vector(s) for text using a Workers AI embedding model via env.AI binding. $1=text, $2=optional model id (default @cf/baai/bge-base-en-v1.5) Use when: you need to wai embed Arguments: $1 | $2. Human article: /a/oip-capability-wai-embed. Machine doc: ?key=WAI_EMBED&format=markdown. Invocation history: /api/invocations?object_id=WAI_EMBED.
WAI_T2I
Generate an image from a prompt using a Workers AI text-to-image model via env.AI binding. Stores the result in R2 and returns a stable URL. $1=prompt, $2=optional model id (default @cf/stabilityai/stable-diffusion-xl-base-1.0) Use when: you need to wai t2i Arguments: $1 | $2. Human article: /a/oip-capability-wai-t2i. Machine doc: ?key=WAI_T2I&format=markdown. Invocation history: /api/invocations?object_id=WAI_T2I.
WAI_TRANSLATE
Translate text between languages using @cf/meta/m2m100-1.2b via env.AI binding. $1=text, $2=source lang code (default en), $3=target lang code (default es) Use when: you need to wai translate Arguments: $1 | $2 | $3. Human article: /a/oip-capability-wai-translate. Machine doc: ?key=WAI_TRANSLATE&format=markdown. Invocation history: /api/invocations?object_id=WAI_TRANSLATE.