Skip to main content

Documentation Index

Fetch the complete documentation index at: https://runinfra.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Every recipe below is a minimal, working example. Copy it, swap your pipeline ID and key, run it. No framework setup, no extra deps unless noted.

Streaming responses

Token-by-token SSE with the OpenAI SDK. Python, TS, curl.

Tool calling

Function calling with typed args and multi-turn tool loops.

Structured output

JSON Schema validation, guaranteed parseable responses.

Retrieval-augmented generation

Embed, retrieve, generate. End-to-end RAG in under 30 lines.

What this section is for

Reach for the cookbook when you want to ship a specific pattern fast. The conceptual guides under Features explain why something works. Cookbook recipes show how with the shortest code path.

What to install once

pip install openai
npm i openai
Most recipes use the OpenAI SDK because it is the fastest drop-in path. Use the native RunInfra SDK when you want pipeline IDs, typed errors, request IDs, replay-safe idempotency helpers, audio binaries, images, or webhook signature verification in one client.

Recipe template

Every page follows the same shape so you can skim fast:
  1. What this does, one sentence.
  2. When to use it, two lines explaining the trigger.
  3. Minimal code, copy-paste, runs as-is.
  4. What to tune, a short table of knobs and their effect.
  5. Common mistakes, three to five gotchas.
  6. Next steps, adjacent recipes.

Contribute a recipe

Open a PR on RightNow-AI/runinfra-docs with a new cookbook/<name>.mdx. Keep code under 40 lines, prose under 200 words.