Pi Durable Platformdocs
ReferenceModels and usage

Add a model to a provider and publish it (platform admins)

POST
/v1/admin/model-providers/{providerId}/models

Path Parameters

providerId*string
Formatuuid

Request Body

application/json
  1. body
upstreamId*string
Lengthlength <= 200
name?string

Defaults to upstreamId

Lengthlength <= 100
contextWindow?integer

Default 128000

Formatint32
maxTokens?integer

Default 16000

Formatint32
images?boolean
reasoning?boolean
inputPrice?number
Formatdouble
outputPrice?number
Formatdouble
enabled?boolean
visibility?string
Value in"all""teams"
personal?boolean

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

teams?array<string>

Team slugs or IDs (visibility teams)

Response Body

Created model

application/json
  1. response
data*
curl -X POST 'https://agents.example.com/v1/admin/model-providers/497f6eca-6276-4993-bfeb-53cbbbba6f08/models' \  -H 'Content-Type: application/json' \  -d '{  "upstreamId": "string"}'
{  "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"  }}