Pi Durable Platformdocs
ReferenceModels and usage

Change a model of one of the team's providers, or turn it off (its owners and admins)

PATCH
/v1/teams/{team}/models/{modelId}

Path Parameters

team*string

Team slug or ID

modelId*string
Formatuuid

Header Parameters

If-Match*string

The resource's revision, as returned in ETag (for example "3"). Missing returns 428; stale returns 412.

Request Body

application/json
  1. body
name?string
Lengthlength <= 100
contextWindow?integer
Formatint32
maxTokens?integer
Formatint32
images?boolean
reasoning?boolean
inputPrice?number

A negative value clears it

Formatdouble
outputPrice?number

A negative value clears it

Formatdouble
enabled?boolean
visibility?string
Value in"all""teams"
personal?boolean

Available in personal workspaces (when created, defaults to visibility = all)

teams?array<string>

Replaces the teams (visibility teams)

Response Body

Updated model

application/json
  1. response
data*
curl -X PATCH 'https://agents.example.com/v1/teams/string/models/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'If-Match: string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",    "providerName": "string",    "providerKind": "string",    "providerEnabled": true,    "accessMode": "proxy",    "upstreamId": "string",    "name": "string",    "contextWindow": 0,    "maxTokens": 0,    "images": true,    "reasoning": true,    "inputPrice": 0,    "outputPrice": 0,    "enabled": true,    "visibility": "all",    "personal": true,    "teams": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "slug": "string",        "name": "string"      }    ],    "providerTeam": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "slug": "string",      "name": "string",      "kind": "team"    },    "revision": 0,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}