TL;DR — Switch in Under 10 Minutes
- Drop multipart/form-data uploads to api.stability.ai — use the OpenAI images.generate API
- Stable Diffusion 3.5 Large, 3.5 Large Turbo and SDXL available
- Standard JSON request body instead of form-data
- Plus access to Flux, GPT-4o, Claude on the same key
Stability AI's 8B MMDiT-based flagship. Open weights at 1MP with improved typography and prompt adherence over SDXL. The largest model in the SD 3.5 release line.
Modelle in diesem Artikel
Why Move Off Stability AI Platform?
Stability's REST API for SD 3.5 and Stable Image works but uses multipart/form-data and a custom credit accounting scheme that does not match the rest of your AI stack. Railwail exposes SD 3.5 and SDXL behind the OpenAI Chat / Images API with simple JSON requests.
Step 1 — Get a Railwail API Key
Sign up at railwail.com and generate a key.
Step 2 — Replace form-data with JSON
Before (Stability):
const form = new FormData();
form.append("prompt", "a cyberpunk city at sunset");
form.append("output_format", "webp");
form.append("aspect_ratio", "16:9");
const res = await fetch("https://api.stability.ai/v2beta/stable-image/generate/sd3", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STABILITY_API_KEY}`,
Accept: "image/*",
},
body: form,
});
const buf = Buffer.from(await res.arrayBuffer());After (Railwail):
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.RAILWAIL_API_KEY,
baseURL: "https://railwail.com/api/v1",
});
const res = await client.images.generate({
model: "stable-diffusion-3-5-large",
prompt: "a cyberpunk city at sunset",
size: "1792x1024",
response_format: "url",
});
console.log(res.data[0].url);from openai import OpenAI
client = OpenAI(
api_key=os.environ["RAILWAIL_API_KEY"],
base_url="https://railwail.com/api/v1",
)
resp = client.images.generate(
model="stable-diffusion-3-5-large",
prompt="a cyberpunk city at sunset",
size="1792x1024",
)
print(resp.data[0].url)curl https://railwail.com/api/v1/images/generations \
-H "Authorization: Bearer $RAILWAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "stable-diffusion-3-5-large",
"prompt": "a cyberpunk city at sunset",
"size": "1792x1024"
}'API Endpoint Mapping
Model Mapping
Why Railwail Over Stability AI Direct
- Simple JSON requests instead of multipart/form-data
- Standard OpenAI images.generate API
- Adds Flux Pro — Stability has only Stable Diffusion family
- Built-in playground for prompt iteration
FAQ
Can I do batch generation?
Yes. Pass n: 4 in the request to get 4 images in one call. Pricing scales linearly per image.
Is the negative_prompt supported?
Yes. Pass negative_prompt as an extension parameter.
Next Steps
- Sign up at railwail.com
- Generate an API key
- Replace multipart/form-data calls with the OpenAI images SDK
- Use stable-diffusion-3-5-large etc. as model IDs
- Read the reference at railwail.com/docs
- Compare pricing at railwail.com/pricing
Modelle in diesem Artikel
Aktuelle Preise nach den Railwail-Preisregeln, Stand 5. Dezember 2026.
- Stable Diffusion 3.5 LargeStability AI$ 0,078 pro BildAusprobieren
- Stable Diffusion 3Stability AI$ 0,042 pro BildAusprobieren
- Stable Diffusion 3.5 Large TurboStability AI$ 0,048 pro BildAusprobieren
- Stable Diffusion XLStability AIca. $ 0,0015 pro LaufAusprobieren
- GPT-4oOpenAI$ 3,00 / 1 Mio. Input-Token$ 12,00/1 Mio. Out1K Eingabe + 500 Ausgabe-Tokens: ≈ $ 0,0090Ausprobieren
- Flux ProBlack Forest Labs$ 0,066 pro BildAusprobieren
≈ abgerechnet nach tatsächlichen Tokens bzw. GPU-Zeit
Nächster Schritt
Stable Diffusion 3.5 Large auf Railwail ausprobieren
Mit Google anmelden und 10 Gratis-Credits erhalten (nutzbar 24 Stunden nach der Anmeldung, Läufe bis 2 Credits) oder ab $ 5,00 aufladen. Nicht genutztes Guthaben verfällt nicht.