---
title: "Set Upstream Price"
method: PUT
path: "/gateway/upstreams/{upstream_id}/prices"
tags: ["gateway"]
---

# Set Upstream Price

`PUT /gateway/upstreams/{upstream_id}/prices`

## 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/{upstream_id}/prices`
- Auth: HTTP bearer

Sets one model's price on the upstream (USD per 1M tokens), which costs its traffic in
your reports.

## Path parameters

- `upstream_id` string, uuid, required

## Request body

- UpstreamPriceIn
  - `model` string, required
  - `input_per_1m` union, required
    - number
    - string
  - `output_per_1m` union, required
    - number
    - string
  - `cached_input_per_1m` union
    - number
    - string

## Response `200`

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)
