---
title: "Create Upstream"
method: POST
path: "/gateway/upstreams"
tags: ["gateway"]
---

# Create Upstream

`POST /gateway/upstreams`

## Request

- Base URL: `https://api.os3robotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.os3robotics.com/gateway/upstreams`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Adds an upstream, where gateway traffic goes. Its vendor key is kept in your
organisation's key vault and never returned.

## Request body

- union
  - UpstreamIn
    - `name` string, required
    - `vendor` 'openai' | 'azure' | 'openai_compatible' | 'anthropic' | 'google', required
    - `base_url` string, required
    - `api_key` string, password, required
  - EndpointUpstreamIn: An upstream that is one of your running OS3 LLM endpoints.
    - `name` string, required
    - `vendor` 'os3_endpoint', required
    - `desired_endpoint_id` string, uuid, required

## Response `201`

Successful Response

- Upstream
  - `id` string, uuid, required
  - `name` string, required
  - `vendor` string, required
  - `base_url` string, nullable, required
  - `api_key_ref` string, nullable, required
  - `model_prices` object, required
  - `desired_endpoint_id` string, uuid, nullable, required
  - `created_at` string, date-time, required
  - `disabled_at` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/os3robotics/apis/os3-api.md) - [All operations](https://skmtc.dev/os3robotics/apis/os3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/os3robotics/apis/os3-api/revisions/af32cd4f14bb?raw)
