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

# Get

GET https://api.humanloop.com/v4/model-configs/{id}

Get a specific model config by ID.

Reference: https://humanloop.com/docs/v4/api/model-configs/get

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Path parameters

- `id` (string, required) — String ID of the model config. Starts with `config_`.

## Response

### 200

Successful Response

- `id` (string, required) — String ID of config. Starts with `config_`.
- `model` (string, required) — The model instance used. E.g. text-davinci-002.
- `other` (map from string to any, optional) — Other parameter values to be passed to the provider call.
- `name` (string, optional) — A friendly display name for the model config. If not provided, a name will be generated.
- `description` (string, optional) — A description of the model config.
- `provider` (enum, optional) — The company providing the underlying model service.
  - Allowed values: `anthropic`, `bedrock`, `cohere`, `deepseek`, `google`, `groq`, `mock`, `openai`, `openai_azure`, `replicate`
- `max_tokens` (integer, optional, default: -1) — The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt
- `temperature` (double, optional, default: 1) — What sampling temperature to use when making a generation. Higher values means the model will be more creative.
- `top_p` (double, optional, default: 1) — An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
- `stop` (ModelConfigResponseStop, optional) — The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.
- `presence_penalty` (double, optional, default: 0) — Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.
- `frequency_penalty` (double, optional, default: 0) — Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.
- `seed` (integer, optional) — If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
- `response_format` (ResponseFormat, optional) — The format of the response. Only type json_object is currently supported for chat.
- `reasoning_effort` (ModelConfigResponseReasoningEffort, optional) — Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.
- `template_language` (enum, optional) — The template language to use for rendering the template.
  - Allowed values: `default`, `jinja`
- `prompt_template` (string, optional) — Prompt template that will take your specified inputs to form your final request to the model. NB: Input variables within the prompt template should be specified with syntax: `{{input_name}}`.
- `chat_template` (list of ChatMessageWithToolCall, optional) — Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the template should be specified with syntax: `{{input_name}}`.
- `tools` (list of ToolResponse, optional) — Tools shown to the model.
- `endpoint` (enum, optional) — The provider model endpoint used.
  - Allowed values: `complete`, `chat`, `edit`
- `tool_configs` (list of ToolConfigResponse, optional, deprecated) — NB: Deprecated with tools field. Definition of tools shown to the model.

## Errors

### 422 Model Configs Get Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ModelConfigResponseStop

The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.

### ResponseFormat

Response format of the model.

- `type` (enum, required)
  - Allowed values: `json_object`, `json_schema`
- `json_schema` (map from string to any, optional) — The JSON schema of the response format if type is json_schema.

### ModelConfigResponseReasoningEffort

Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget.

### ChatMessageWithToolCall

- `role` (enum, required) — Role of the message author.
  - Allowed values: `user`, `assistant`, `system`, `tool`, `developer`
- `content` (Content, optional) — The content of the message.
- `name` (string, optional) — Optional name of the message author.
- `tool_call_id` (string, optional) — Tool call that this message is responding to.
- `tool_calls` (list of ToolCall, optional) — A list of tool calls requested by the assistant.
- `thinking` (list of ChatMessageWithToolCallThinkingItem, optional) — Model's chain-of-thought for providing the response. Present on assistant messages if model supports it.
- `tool_call` (FunctionTool, optional, deprecated) — NB: Deprecated in favour of tool_calls. A tool call requested by the assistant.

### ToolResponse

- `id` (string, required) — The ID of the tool. Starts with either `config_` or `oc_`.
- `name` (string, required) — Name for the tool referenced by the model.
- `description` (string, optional) — Description of the tool referenced by the model
- `parameters` (map from string to any, optional) — Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/
- `source` (string, optional) — The origin of the tool

### ToolConfigResponse

- `id` (string, required) — String ID of config. Starts with `config_`.
- `status` (string, required) — Whether the config is committed or not.
- `name` (string, required) — Name for the tool referenced by the model.
- `other` (map from string to any, optional) — Other parameters that define the config.
- `created_by` (UserResponse, optional) — The user who created the config.
- `description` (string, optional) — Description of the tool referenced by the model
- `source` (enum, optional) — Source of the tool. If defined at an organization level will be 'organization' else 'inline'.
  - Allowed values: `organization`, `inline`
- `source_code` (string, optional) — Code source of the tool.
- `setup_schema` (map from string to any, optional) — Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/
- `parameters` (map from string to any, optional) — Definition of parameters needed to run the tool. Provided in jsonschema format: https://json-schema.org/
- `signature` (string, optional) — The function signature of the tool when being called.
- `is_preset` (boolean, optional) — Whether the tool is one where Humanloop defines runtime or not.
- `preset_name` (string, optional) — If is_preset = true, this is the name of the preset tool on Humanloop. This is used as the key to lookup the Humanloop runtime of the tool

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### Content

The content of the message.

### ToolCall

A tool call to be made.

- `id` (string, required)
- `type` ("function", required) — The type of tool to call.
- `function` (FunctionTool, required) — A function tool to be called by the model where user owns runtime.

### ChatMessageWithToolCallThinkingItem

- `type`: `thinking`
  - `signature` (string, required) — Cryptographic signature that verifies the thinking block was generated by Anthropic.
  - `thinking` (string, required) — Model's chain-of-thought for providing the response.
- `type`: `redacted_thinking`
  - `data` (string, required) — Thinking block Anthropic redacted for safety reasons. User is expected to pass the block back to Anthropic

### FunctionTool

A function tool to be called by the model where user owns runtime.

- `name` (string, required)
- `arguments` (string, optional)

### UserResponse

- `id` (string, required) — String ID of user. Starts with `usr_`.
- `email_address` (string, required) — The user's email address.
- `verified` (boolean, required) — Whether the user has verified their email address.
- `full_name` (string, optional) — The user's full name.

### ValidationErrorLocItem

## Examples

**Response**

```json
{
  "id": "id",
  "model": "model",
  "other": {
    "key": "value"
  },
  "name": "name",
  "description": "description",
  "provider": "anthropic",
  "max_tokens": 1,
  "temperature": 1.1,
  "top_p": 1.1,
  "stop": "stop",
  "presence_penalty": 1.1,
  "frequency_penalty": 1.1,
  "seed": 1,
  "response_format": {
    "type": "json_object",
    "json_schema": {
      "key": "value"
    }
  },
  "reasoning_effort": "high",
  "template_language": "default",
  "prompt_template": "prompt_template",
  "chat_template": [
    {
      "role": "user",
      "content": "content",
      "name": "name",
      "tool_call_id": "tool_call_id",
      "tool_calls": [
        {
          "id": "id",
          "type": "function",
          "function": {
            "name": "name"
          }
        }
      ],
      "thinking": [
        {
          "type": "thinking",
          "signature": "signature",
          "thinking": "thinking"
        }
      ],
      "tool_call": {
        "name": "name"
      }
    }
  ],
  "tools": [
    {
      "id": "id",
      "name": "name",
      "description": "description",
      "parameters": {
        "key": "value"
      },
      "source": "source"
    }
  ],
  "endpoint": "complete",
  "tool_configs": [
    {
      "id": "id",
      "status": "status",
      "name": "name",
      "other": {
        "key": "value"
      },
      "created_by": {
        "id": "id",
        "email_address": "email_address",
        "verified": true
      },
      "description": "description",
      "source": "organization",
      "source_code": "source_code",
      "setup_schema": {
        "key": "value"
      },
      "parameters": {
        "key": "value"
      },
      "signature": "signature",
      "is_preset": true,
      "preset_name": "preset_name"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.humanloop.com/v4/model-configs/id"

headers = {"X-API-KEY": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api.humanloop.com/v4/model-configs/id';
const options = {method: 'GET', headers: {'X-API-KEY': '<apiKey>'}};

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.humanloop.com/v4/model-configs/id"

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

	req.Header.Add("X-API-KEY", "<apiKey>")

	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.humanloop.com/v4/model-configs/id")

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

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<apiKey>'

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.get("https://api.humanloop.com/v4/model-configs/id")
  .header("X-API-KEY", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.humanloop.com/v4/model-configs/id', [
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.humanloop.com/v4/model-configs/id");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.humanloop.com/v4/model-configs/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```