Skip to contentSkip to page list

Docs

Create or update a model provider

Create or update a model provider

PUT/api/v1/model-providers/{provider}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/model-providers/<provider>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {}​response = requests.put(    origin + path,    headers=headers,    json=payload,)print(response.json())

Success

application/json · No fields specified

api-reference/model-providers/update-model-providers

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

providerstringrequired
At least 1 character

Request body

application/json · Required

enabledbooleanrequired
customKeysobject
customModelsobject[] | string[]
Option 1object[]
modelIdstringrequired
At least 1 character
displayNamestringrequired
At least 1 character
modestringrequired
One of"chat""embedding"
maxTokensnumber | null
supportedParametersstring[]
multimodalInputsstring[]
Option 2string[]
customEmbeddingsModelsobject[] | string[]
Option 1object[]
modelIdstringrequired
At least 1 character
displayNamestringrequired
At least 1 character
modestringrequired
One of"chat""embedding"
maxTokensnumber | null
supportedParametersstring[]
multimodalInputsstring[]
Option 2string[]
extraHeadersobject[]
keystringrequired
valuestringrequired
defaultModelstring

Responses

200

Success

application/json

objectAdditional properties allowedNo properties are declared in the schema.
400

Bad Request

application/json

errorstringrequired
messagestring
401

Unauthorized

application/json

errorstringrequired
messagestring
409

Conflict

application/json

errorstringrequired
messagestringrequired
422

Unprocessable Entity

application/json

errorstringrequired
messagestring
500

Internal Server Error

application/json

errorstringrequired
messagestring

Documentation