请求构建器

使用此交互式工具构建 OpenRouter API 请求。选择模型,配置消息、参数和提供商偏好,然后生成您首选语言的代码。

模型选择

选择一个或多个模型。其他模型将用作回退模型。

消息

启用后,API 将在 token 生成时以流式方式返回。

请求功能

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
        {
            "role": "user",
            "content": "If you built the world'\''s tallest skyscraper, what would you name it?"
        }
    ]
}'