Documentation

Build with Railwail

One API to access 100+ AI models. Text, images, video, audio — all with a single API key. No need to manage multiple providers or learn different SDKs.

Terminal
npm install railwail

Base URL

All API requests go to https://railwail.com/api/v1. The SDK handles this automatically.

Get Started

Everything you need to start building with Railwail.

What You Can Build

Railwail gives you access to every major AI capability through a unified interface.

Text & Chat

GPT-4o, Claude, Gemini, Llama, DeepSeek, and dozens more chat models.

Image Generation

Flux, DALL-E 3, Stable Diffusion, Ideogram, Recraft, and more image models.

Embeddings

text-embedding-3, Nomic, BGE — generate vector embeddings for search and RAG.

How It Works

Railwail acts as a universal gateway to AI models. You send requests through one API, and Railwail routes them to the right provider.

TypeScript
import railwail from "railwail";

const rw = railwail("rw_live_xxxxx");

// Text — automatically routes to the chat endpoint
const reply = await rw.run("gpt-4o", "Explain quantum computing");

// Images — automatically routes to the image endpoint
const images = await rw.run("flux-schnell", "A sunset over Tokyo");

// Embeddings — explicitly set the type
const vectors = await rw.run("text-embedding-3-small", "Hello", { type: "embed" });

Smart routing

The rw.run() method auto-detects whether your model is a text, image, or embedding model and routes to the correct endpoint. You can also use the specific methods (rw.chat(), rw.image(), rw.embed()) for full control over the response format.

Resources

    Documentation — Railwail