> 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.

# Set default model configuration

PATCH https://api.runtype.com/v1/model-configs/{id}/default

Mark a model configuration as the default for the authenticated user.

Reference: https://docs.runtype.com/api-reference/runtype-api/model-configs/set-default-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)

## Response

### 200

Default model set

- `data` (V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaData, required)
- `message` (string, required)
- `success` (boolean, required)

## Errors

### 400 Bad Request Error

Invalid config ID

- `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

- `SetDefaultModelConfigurationRequestConflictError`
  - SetDefaultModelConfigurationRequestConflictError0
  - SetDefaultModelConfigurationRequestConflictError1

### 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

### V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaData

- `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` (V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaDataReasoningCapability, optional)
- `supportedResponseFormats` (list of string, optional)
- `supportsCustomKey` (boolean, optional)
- `supportsSearch` (boolean, optional)
- `supportsStreaming` (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, …).

### SetDefaultModelConfigurationRequestConflictError0

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

### SetDefaultModelConfigurationRequestConflictError1

- `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)

### V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaDataReasoningCapability

- `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` (V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaDataReasoningCapabilityOptions, 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)

### V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaDataReasoningCapabilityOptions

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` (V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaDataReasoningCapabilityOptionsBudgetTokens, optional)
- `effort` (list of string, optional)
- `toggle` (boolean, optional)

### V1ModelConfigsIdDefaultPatchResponsesContentApplicationJsonSchemaDataReasoningCapabilityOptionsBudgetTokens

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

## Examples

**Response**

```json
{
  "data": {
    "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
  },
  "message": "string",
  "success": true
}
```

**SDK Code**

```python
import requests

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

headers = {"Authorization": "Bearer <token>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/model-configs/id/default';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

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

```go
package main

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

func main() {

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

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.runtype.com/v1/model-configs/id/default")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.runtype.com/v1/model-configs/id/default', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/model-configs/id/default");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

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

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()
```