Pi Durable Platformdocs
ReferenceModels and usage

Add a model provider for the team (its owners and admins, in a browser session)

POST
/v1/teams/{team}/model-providers

Proxy mode only. The base URL must be https and on an address teams may use: public, or private inside the networks platform admins allow (422 address_not_allowed); it is checked again at every connection. Refused with 409 team_providers_off while platform admins have turned team providers off, and 409 personal_workspace in a personal workspace unless they let personal workspaces add providers. The key is stored encrypted and never returned.

Path Parameters

team*string

Team slug or ID

Request Body

application/json
  1. body
name*string
Lengthlength <= 100
kind*string
Value in"openai""anthropic""openai-compatible""openai-responses""anthropic-compatible"
baseUrl?string

Default for openai and anthropic; required otherwise (for example https://litellm.example.com/v1)

Lengthlength <= 2048
apiKey*string
Lengthlength <= 4096
accessMode?string

Default proxy (a team's providers are proxy only)

Value in"proxy""direct"
headers?

Extra headers sent with every request (at most 20)

enabled?boolean

Response Body

Created provider

application/json
  1. response
data*
curl -X POST 'https://agents.example.com/v1/teams/string/model-providers' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "kind": "openai",  "apiKey": "string"}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "kind": "openai",    "baseUrl": "string",    "accessMode": "proxy",    "enabled": true,    "hasHeaders": true,    "modelCount": 0,    "revision": 0,    "team": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "slug": "string",      "name": "string",      "kind": "team"    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}