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.
Update Organization
Create or update an organization-level model provider. Secret fields left out, or sent masked, keep their stored value. Requires organization:manage at the organization.
Try this endpoint
app.langwatch.ai
API key · X-Auth-Token
Kept in this tab. Cleared when you reload.
This sends a live request to app.langwatch.ai.
Request and response examples
import osimport requestsorigin = "https://app.langwatch.ai"path = "/api/v1/model-providers/organization/<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())const url = "https://app.langwatch.ai/api/v1/model-providers/organization/<provider>";const response = await fetch(url, { method: "PUT", headers: { "X-Auth-Token": process.env.LANGWATCH_API_KEY!, "Content-Type": "application/json", }, body: JSON.stringify({}),});const data = await response.json();curl --request PUT \ --url 'https://app.langwatch.ai/api/v1/model-providers/organization/<provider>' \ --header "X-Auth-Token: $LANGWATCH_API_KEY" \ --header 'Content-Type: application/json' \ --data '{}'Call the LangWatch API from this project.Request: PUT https://app.langwatch.ai/api/v1/model-providers/organization/<provider>Reference: https://langwatch.ai/docs/api-reference/model-providers/update-organization.mdAuthentication: send the X-Auth-Token header, read from the LANGWATCH_API_KEY environment variable. Never hard-code the key.Body (application/json):```json{}```Use the HTTP client this project already uses, handle non-2xx responses, and show me the parsed result.Success
application/json · Generated from schema
{ "id": "string", "provider": "string", "enabled": false, "customKeys": {}, "deploymentMapping": null, "models": [ "string" ], "embeddingsModels": [ "string" ], "customModels": [ { "modelId": "string", "displayName": "string", "mode": "chat", "maxTokens": 0, "supportedParameters": [ "temperature" ], "multimodalInputs": [ "image" ] } ], "customEmbeddingsModels": [ { "modelId": "string", "displayName": "string", "mode": "chat", "maxTokens": 0, "supportedParameters": [ "temperature" ], "multimodalInputs": [ "image" ] } ], "disabledByDefault": false, "extraHeaders": [ { "key": "string", "value": "string" } ], "name": "string"}Bad Request
application/json · Generated from schema
{ "error": "string", "message": "string"}Unauthorized
application/json · Generated from schema
{ "error": "string", "message": "string"}Conflict
application/json · Generated from schema
{ "error": "string", "message": "string"}Unprocessable Entity
application/json · Generated from schema
{ "error": "string", "message": "string"}Internal Server Error
application/json · Generated from schema
{ "error": "string", "message": "string"}Path parameters
providerstringrequiredRequest body
application/json · Required
enabledbooleanrequiredcustomKeysobjectcustomModelsobject[] | string[]customEmbeddingsModelsobject[] | string[]extraHeadersobject[]defaultModelstringidstringResponses
200Success
application/json
idstringrequiredproviderstringrequiredenabledbooleanrequiredcustomKeysobject | nullrequireddeploymentMappingany | nullrequiredmodelsstring[] | nullembeddingsModelsstring[] | nullcustomModelsobject[] | nullcustomEmbeddingsModelsobject[] | nulldisabledByDefaultbooleanextraHeadersobject[] | nullnamestringrequired400Bad Request
application/json
errorstringrequiredmessagestring401Unauthorized
application/json
errorstringrequiredmessagestring409Conflict
application/json
errorstringrequiredmessagestringrequired422Unprocessable Entity
application/json
errorstringrequiredmessagestring500Internal Server Error
application/json
errorstringrequiredmessagestring