modelConfigs

Register

Register a model config to a project.

If the project name provided does not exist, a new project will be created automatically.

If the model config is the first to be associated to the project, it will be set as the active model config.

post/model-configs

Request

  • Base URL: https://api.humanloop.com/v4
  • URL: https://api.humanloop.com/v4/model-configs
  • Auth: API key in header X-API-KEY

Request body

namestring

A friendly display name for the model config. If not provided, a name will be generated.

descriptionstring

A description of the model config.

provider'anthropic' | 'bedrock' | 'cohere' | 'deepseek' | 'google' | 'groq' | 'mock' | 'openai' | 'openai_azure' | 'replicate'

Supported model providers.

modelstring required

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

max_tokensinteger

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

temperaturenumber double

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

top_pnumber double

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

presence_penaltynumber double

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

frequency_penaltynumber double

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

otherobject

Other parameter values to be passed to the provider call.

seedinteger

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

template_language'default' | 'jinja'

Template engine to use for rendering templates.

projectstring

Unique project name. If it does not exist, a new project will be created.

project_idstring

Unique project ID

prompt_templatestring

Prompt template that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{input_name}}.

endpoint'complete' | 'chat' | 'edit'

Supported model provider endpoints.

Response

Successful Response

project_idstring required

String ID of project the model config belongs to. Starts with pr_.

project_namestring required

Name of the project the model config belongs to.

created_atstring date-time required
updated_atstring date-time required
last_usedstring date-time required
num_datapointsinteger

Number of datapoints associated with this project model config.

Changes

No recorded changes to this operation across all 1 revision of this API.