> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# Update model configuration

PUT https://api.runtype.com/v1/model-configs/{id}
Content-Type: application/json

Update fields on an existing model configuration.

Reference: https://docs.runtype.com/api-reference/runtype-api/model-configs/update-model-configuration

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Path parameters

- `id` (string, required)

### Body (application/json)

This endpoint expects an object.

- `isDefault` (boolean, optional)
- `isEnabled` (boolean, optional)
- `providerKeyId` (string, optional) — Credential selector: `platform`, a provider-key ID, or an organization-connection ID. For migrated model providers this stores the model reference without changing organization-wide credential policy.
- `settings` (V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettings, optional)

## Response

### 200

Updated model configuration

- `createdAt` (string, required)
- `id` (string, required)
- `isDefault` (boolean, required)
- `isEnabled` (boolean, required)
- `modelId` (string, required)
- `organizationId` (string, required, nullable)
- `provider` (string, required)
- `providerKeyId` (string, required, nullable) — Previous-Worker-compatible provider-key alias. Updated organization clients should use organizationConnectionId; platform selection is null.
- `settings` (map from string to any, required)
- `updatedAt` (string, required)
- `userId` (string, required, nullable) — Legacy actor owner for personal/compatibility rows. Null for organization-owned model configurations.
- `configScope` (string, optional) — `personal` or `organization` for a stored configuration. `organization_connection` marks a model an organization custom inference endpoint declares that the caller has no stored configuration for: it is runnable, and its `id` cannot be updated, toggled, or deleted (change the connection model list instead).
- `configurationStatus` (enum, optional) — Organization configuration readiness. `needs_configuration` means conflicting legacy teammate settings were preserved and execution fails closed until an authorized actor deliberately updates the canonical row.
  - Allowed values: `ready`, `needs_configuration`
- `costPer1kTokens` (double, optional)
- `createdByUserId` (string, optional, nullable) — Nullable creation provenance for organization-owned model configurations; never authorization or execution authority.
- `creator` (string, optional)
- `creatorDisplayName` (string, optional, nullable)
- `creditPromoLabel` (string, optional, nullable) — Plain-language discount callout for this model, e.g. "90% off". null when undiscounted.
- `creditPromoMultiplier` (double, optional) — Factor platform-key spend on this model is billed at while a credit promo is active (0.1 = 90% off). 1 when no discount applies.
- `displayName` (string, optional)
- `inputCostPer1kTokens` (double, optional)
- `isAvailable` (boolean, optional) — Read-only inference availability under workspace policy; does not change persisted isEnabled.
- `keyStatus` (enum, optional)
  - Allowed values: `platform`, `custom`, `needs_setup`
- `maxOutputTokens` (double, optional)
- `migrationCandidateCount` (integer, optional) — Number of preserved legacy candidates considered during organization migration. Candidate settings remain internal.
- `organizationConnectionId` (string, optional, nullable) — Normalized organization-owned connection reference. Null for platform selection, personal credentials, and providers that have not migrated.
- `outputCostPer1kTokens` (double, optional)
- `reasoningCapability` (V1ModelConfigsIdPutResponsesContentApplicationJsonSchemaReasoningCapability, optional)
- `supportedResponseFormats` (list of string, optional)
- `supportsCustomKey` (boolean, optional)
- `supportsSearch` (boolean, optional)
- `supportsStreaming` (boolean, optional)

## Errors

### 400 Bad Request Error

Validation error

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 403 Forbidden Error

Insufficient permissions

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 404 Not Found Error

Model configuration not found

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 409 Conflict Error

Organization model configuration migration conflict

- `UpdateModelConfigurationRequestConflictError`
  - UpdateModelConfigurationRequestConflictError0
  - UpdateModelConfigurationRequestConflictError1

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

## Types

### V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettings

- `customModel` (V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettingsCustomModel, optional)
- `maxTokens` (integer, optional)
- `temperature` (double, optional)

### V1ModelConfigsIdPutResponsesContentApplicationJsonSchemaReasoningCapability

- `supported` (boolean, required)
- `anthropicThinkingMode` (enum, optional) — Anthropic only: the thinking request shape sent. adaptive (Claude 4.6 and later, including the Claude 5 family) accepts effort and rejects budgetTokens; enabled is the legacy budgetTokens form.
  - Allowed values: `adaptive`, `enabled`
- `builtInReasoning` (boolean, optional) — The model always reasons (GPT-5 / o-series); disabling is an effort floor, not off.
- `googleThinkingMode` (enum, optional)
  - Allowed values: `budget`, `level`
- `options` (V1ModelConfigsIdPutResponsesContentApplicationJsonSchemaReasoningCapabilityOptions, optional) — Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model.
- `provider` (string, optional)
- `supportsReasoningSummary` (boolean, optional)

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### UpdateModelConfigurationRequestConflictError0

- `code` (enum, required)
  - Allowed values: `ORGANIZATION_MODEL_CONFIG_MIGRATED`
- `configId` (string, required)
- `details` (string, required)
- `error` (string, required)

### UpdateModelConfigurationRequestConflictError1

- `candidateCount` (integer, required)
- `code` (enum, required)
  - Allowed values: `ORGANIZATION_MODEL_CONFIG_NEEDS_CONFIGURATION`
- `configId` (string, required)
- `details` (string, required)
- `error` (string, required)
- `modelId` (string, required)
- `provider` (string, required)

### V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettingsCustomModel

- `displayName` (string, required)
- `inputCostPer1kTokens` (double, required)
- `outputCostPer1kTokens` (double, required)
- `executorConfig` (V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettingsCustomModelExecutorConfig, optional)
- `executorProvider` (enum, optional)
  - Allowed values: `openai`, `anthropic`, `google`, `xai`, `vertex`, `vertex-anthropic`, `bedrock`, `tinfoil`, `vercel`, `generic-openai`
- `maxOutputTokens` (integer, optional)
- `midConversationSystemMessages` (enum, optional) — Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
  - Allowed values: `preserve`, `hoist`
- `reasoning` (V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettingsCustomModelReasoning, optional)
- `supportedResponseFormats` (list of string, optional)
- `supportsStreaming` (boolean, optional)

### V1ModelConfigsIdPutResponsesContentApplicationJsonSchemaReasoningCapabilityOptions

Which reasoning knobs this model's API accepts (catalog-sourced from models.dev reasoning_options). Absent when the catalog has no claim for the model.

- `budgetTokens` (V1ModelConfigsIdPutResponsesContentApplicationJsonSchemaReasoningCapabilityOptionsBudgetTokens, optional)
- `effort` (list of string, optional)
- `toggle` (boolean, optional)

### V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettingsCustomModelExecutorConfig

- `baseURL` (string, optional)
- `modelMapping` (string, optional)

### V1ModelConfigsIdPutRequestBodyContentApplicationJsonSchemaSettingsCustomModelReasoning

- `supported` (boolean, required)
- `defaultEffort` (string, optional)

### V1ModelConfigsIdPutResponsesContentApplicationJsonSchemaReasoningCapabilityOptionsBudgetTokens

- `max` (double, optional)
- `min` (double, optional)

## Examples

**Request**

```json
{
  "isEnabled": true,
  "settings": {
    "maxTokens": 1500,
    "temperature": 0.9
  }
}
```

**Response**

```json
{
  "createdAt": "string",
  "id": "string",
  "isDefault": true,
  "isEnabled": true,
  "modelId": "string",
  "organizationId": "string",
  "provider": "string",
  "providerKeyId": "string",
  "settings": {},
  "updatedAt": "string",
  "userId": "string",
  "configScope": "string",
  "configurationStatus": "ready",
  "costPer1kTokens": 1.1,
  "createdByUserId": "string",
  "creator": "string",
  "creatorDisplayName": "string",
  "creditPromoLabel": "string",
  "creditPromoMultiplier": 1.1,
  "displayName": "string",
  "inputCostPer1kTokens": 1.1,
  "isAvailable": true,
  "keyStatus": "platform",
  "maxOutputTokens": 1.1,
  "migrationCandidateCount": 1,
  "organizationConnectionId": "string",
  "outputCostPer1kTokens": 1.1,
  "reasoningCapability": {
    "supported": true,
    "anthropicThinkingMode": "adaptive",
    "builtInReasoning": true,
    "googleThinkingMode": "budget",
    "options": {
      "budgetTokens": {
        "max": 1.1,
        "min": 1.1
      },
      "effort": [
        "string"
      ],
      "toggle": true
    },
    "provider": "string",
    "supportsReasoningSummary": true
  },
  "supportedResponseFormats": [
    "string"
  ],
  "supportsCustomKey": true,
  "supportsSearch": true,
  "supportsStreaming": true
}
```

**SDK Code**

```python Update Model Configuration
import requests

url = "https://api.runtype.com/v1/model-configs/id"

payload = {
    "isEnabled": True,
    "settings": {
        "maxTokens": 1500,
        "temperature": 0.9
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Update Model Configuration
const url = 'https://api.runtype.com/v1/model-configs/id';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"isEnabled":true,"settings":{"maxTokens":1500,"temperature":0.9}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Update Model Configuration
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.runtype.com/v1/model-configs/id"

	payload := strings.NewReader("{\n  \"isEnabled\": true,\n  \"settings\": {\n    \"maxTokens\": 1500,\n    \"temperature\": 0.9\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Update Model Configuration
require 'uri'
require 'net/http'

url = URI("https://api.runtype.com/v1/model-configs/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"isEnabled\": true,\n  \"settings\": {\n    \"maxTokens\": 1500,\n    \"temperature\": 0.9\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Update Model Configuration
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.runtype.com/v1/model-configs/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"isEnabled\": true,\n  \"settings\": {\n    \"maxTokens\": 1500,\n    \"temperature\": 0.9\n  }\n}")
  .asString();
```

```php Update Model Configuration
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.runtype.com/v1/model-configs/id', [
  'body' => '{
  "isEnabled": true,
  "settings": {
    "maxTokens": 1500,
    "temperature": 0.9
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Update Model Configuration
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/model-configs/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"isEnabled\": true,\n  \"settings\": {\n    \"maxTokens\": 1500,\n    \"temperature\": 0.9\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update Model Configuration
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "isEnabled": true,
  "settings": [
    "maxTokens": 1500,
    "temperature": 0.9
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/model-configs/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```