fal Sandbox is here - run all your models together! πŸ–οΈ

OpenRouter Responses [OpenAI Compatible] Large Language Models

openrouter/router/openai/v1/responses
The OpenRouter Responses API with fal, powered by OpenRouter, provides unified access to a wide range of large language models - including GPT, Claude, Gemini, and many others through a single API interface.
Inference
Commercial use

Input

Result

Idle

Waiting for your input...

You will be charged based on the number of input and output tokens.

Logs

πŸš€ Usage with OpenAI Client (Responses API)

python
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://fal.run/openrouter/router/openai/v1",
    api_key="not-needed",
    default_headers={
        "Authorization": f"Key {os.environ['FAL_KEY']}",
    },
)

response = client.responses.create(
    model="google/gemini-2.5-flash",
    input=[
        {"role": "user", "content": "Write a short story (under 200 words) about an AI that learns to dream. Use vivid sensory details and end with a surprising twist that makes the reader feel both awe and melancholy."},
    ],
    temperature=1,
)

print(response.output_text)

🚿 Streaming Example (Responses API)

python
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://fal.run/openrouter/router/openai/v1",
    api_key="not-needed",
    default_headers={
        "Authorization": f"Key {os.environ['FAL_KEY']}",
    },
)

stream = client.responses.create(
    model="google/gemini-2.5-flash",
    input=[
        {"role": "user", "content": "Write a short story (under 200 words) about an AI that learns to dream. Use vivid sensory details and end with a surprising twist that makes the reader feel both awe and melancholy."},
    ],
    stream=True,
)

for event in stream:
    if event.type == "response.output_text.delta":
        print(event.delta, end="", flush=True)

πŸ“š Documentation

For more details, visit the official docs: