For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • SDKs
    • Errors
  • Humanloop API
      • POSTRegister
      • GETGet
      • POSTExport by ID
      • POSTSerialize
      • POSTDeserialize
LogoLogo
Sign inBook a demo
Humanloop APIModel Configs

Deserialize

POST
https://api.humanloop.com/v4/model-configs/deserialize
POST
/v4/model-configs/deserialize
$curl -X POST https://api.humanloop.com/v4/model-configs/deserialize \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "config": "config"
>}'
1{
2 "id": "id",
3 "model": "model",
4 "other": {
5 "key": "value"
6 },
7 "name": "name",
8 "description": "description",
9 "provider": "anthropic",
10 "max_tokens": 1,
11 "temperature": 1.1,
12 "top_p": 1.1,
13 "stop": "stop",
14 "presence_penalty": 1.1,
15 "frequency_penalty": 1.1,
16 "seed": 1,
17 "response_format": {
18 "type": "json_object",
19 "json_schema": {
20 "key": "value"
21 }
22 },
23 "reasoning_effort": "high",
24 "template_language": "default",
25 "prompt_template": "prompt_template",
26 "chat_template": [
27 {
28 "role": "user",
29 "content": "content",
30 "name": "name",
31 "tool_call_id": "tool_call_id",
32 "tool_calls": [
33 {
34 "id": "id",
35 "type": "function",
36 "function": {
37 "name": "name"
38 }
39 }
40 ],
41 "thinking": [
42 {
43 "type": "thinking",
44 "signature": "signature",
45 "thinking": "thinking"
46 }
47 ],
48 "tool_call": {
49 "name": "name"
50 }
51 }
52 ],
53 "tools": [
54 {
55 "id": "id",
56 "name": "name",
57 "description": "description",
58 "parameters": {
59 "key": "value"
60 },
61 "source": "source"
62 }
63 ],
64 "endpoint": "complete",
65 "tool_configs": [
66 {
67 "id": "id",
68 "status": "status",
69 "name": "name",
70 "other": {
71 "key": "value"
72 },
73 "created_by": {
74 "id": "id",
75 "email_address": "email_address",
76 "verified": true
77 },
78 "description": "description",
79 "source": "organization",
80 "source_code": "source_code",
81 "setup_schema": {
82 "key": "value"
83 },
84 "parameters": {
85 "key": "value"
86 },
87 "signature": "signature",
88 "is_preset": true,
89 "preset_name": "preset_name"
90 }
91 ]
92}
Deserialize a model config from a .prompt file format.
Was this page helpful?
Previous

List

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Request

This endpoint expects an object.
configstringRequired

Response

Successful Response
idstring

String ID of config. Starts with config_.

modelstring

The model instance used. E.g. text-davinci-002.

othermap from strings to any
Other parameter values to be passed to the provider call.
namestring
A friendly display name for the model config. If not provided, a name will be generated.
descriptionstring
A description of the model config.
providerenum
The company providing the underlying model service.
max_tokensintegerDefaults to -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

temperaturedoubleDefaults to 1
What sampling temperature to use when making a generation. Higher values means the model will be more creative.
top_pdoubleDefaults to 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

stopstring or list of strings

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

presence_penaltydoubleDefaults to 0

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.

frequency_penaltydoubleDefaults to 0

Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.

seedinteger
If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
response_formatobject

The format of the response. Only type json_object is currently supported for chat.

reasoning_effortenum or integer

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_languageenum
The template language to use for rendering the template.
Allowed values:
prompt_templatestring

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_templatelist of objects

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

toolslist of objects
Tools shown to the model.
endpointenum
The provider model endpoint used.
Allowed values:
tool_configslist of objectsDeprecated

NB: Deprecated with tools field. Definition of tools shown to the model.

Errors

422
Model Configs Deserialize Request Unprocessable Entity Error