> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://humanloop.com/docs/v5/api/tools/list-versions/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/_mcp/server. # List Versions of a Tool GET https://api.humanloop.com/v5/tools/{id}/versions Get a list of all the versions of a Tool. Reference: https://humanloop.com/docs/api/tools/list-versions ## Authentication - `X-API-KEY` header (required) — API Key authentication via header ## Request ### Path parameters - `id` (string, required) — Unique identifier for the Tool. ### Query parameters - `evaluator_aggregates` (boolean, optional) — Whether to include Evaluator aggregate results for the versions in the response ## Response ### 200 Successful Response - `records` (list of ToolResponse, required) — The list of Tools. ## Errors ### 422 List Versions Tools ID Versions Get Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### ToolResponse Base type that all File Responses should inherit from. Attributes defined here are common to all File Responses and should be overridden in the inheriting classes with documentation and appropriate Field definitions. - `path` (string, required) — Path of the Tool, including the name, which is used as a unique identifier. - `id` (string, required) — Unique identifier for the Tool. - `name` (string, required) — Name of the Tool, which is used as a unique identifier. - `version_id` (string, required) — Unique identifier for the specific Tool Version. If no query params provided, the default deployed Tool Version is returned. - `created_at` (datetime, required) - `updated_at` (datetime, required) - `last_used_at` (datetime, required) - `version_logs_count` (integer, required) — The number of logs that have been generated for this Tool Version - `total_logs_count` (integer, required) — The number of logs that have been generated across all Tool Versions - `inputs` (list of InputResponse, required) — Inputs associated to the Prompt. Inputs correspond to any of the variables used within the Tool template. - `directory_id` (string, optional) — ID of the directory that the file is in on Humanloop. - `function` (ToolFunction, optional) — Callable function specification of the Tool shown to the model for tool calling. - `source_code` (string, optional) — Code source of the Tool. - `setup_values` (map from string to any, optional) — Values needed to setup the Tool, defined in JSON Schema format: https://json-schema.org/ - `attributes` (map from string to any, optional) — Additional fields to describe the Tool. Helpful to separate Tool versions from each other with details on how they were created or used. - `tool_type` (enum, optional) — Type of Tool. - Allowed values: `pinecone_search`, `google`, `mock`, `snippet`, `json_schema`, `get_api_call`, `python` - `version_name` (string, optional) — Unique identifier for this Tool version. Each Tool can only have one version with a given name. - `version_description` (string, optional) — Description of the Version. - `description` (string, optional) — Description of the Tool. - `readme` (string, optional) — Long description of the file. - `tags` (list of string, optional) — List of tags associated with the file. - `type` ("tool", optional) - `environments` (list of EnvironmentResponse, optional) — The list of environments the Tool Version is deployed to. - `created_by` (any, optional) — The user who created the Tool. - `evaluators` (list of MonitoringEvaluatorResponse, optional) — Evaluators that have been attached to this Tool that are used for monitoring logs. - `signature` (string, optional) — Signature of the Tool. - `evaluator_aggregates` (list of EvaluatorAggregate, optional) — Aggregation of Evaluator results for the Tool Version. ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### InputResponse - `name` (string, required) — Type of input. ### ToolFunction - `name` (string, required) — Name for the tool referenced by the model. - `description` (string, required) — Description of the tool referenced by the model - `strict` (boolean, optional, default: false) — If true, forces the model to output json data in the structure of the parameters schema. - `parameters` (map from string to any, optional) — Parameters needed to run the Tool, defined in JSON Schema format: https://json-schema.org/ ### EnvironmentResponse - `id` (string, required) - `created_at` (datetime, required) - `name` (string, required) - `tag` (enum, required) — An enumeration. - Allowed values: `default`, `other` ### MonitoringEvaluatorResponse - `version_reference` (VersionReferenceResponse, required) — The Evaluator Version used for monitoring. This can be a specific Version by ID, or a Version deployed to an Environment. - `state` (enum, required) — The state of the Monitoring Evaluator. Either `active` or `inactive` - Allowed values: `active`, `inactive` - `created_at` (datetime, required) - `updated_at` (datetime, required) - `version` (EvaluatorResponse, optional) — The deployed Version. ### EvaluatorAggregate - `value` (double, required) — The aggregated value of the evaluator. - `evaluator_id` (string, required) — ID of the evaluator. - `evaluator_version_id` (string, required) — ID of the evaluator version. - `created_at` (datetime, required) - `updated_at` (datetime, required) ### ValidationErrorLocItem ### VersionReferenceResponse ### EvaluatorResponse Version of the Evaluator used to provide judgments. - `path` (string, required) — Path of the Evaluator including the Evaluator name, which is used as a unique identifier. - `id` (string, required) — Unique identifier for the Evaluator. - `spec` (EvaluatorResponseSpec, required) - `name` (string, required) — Name of the Evaluator, which is used as a unique identifier. - `version_id` (string, required) — Unique identifier for the specific Evaluator Version. If no query params provided, the default deployed Evaluator Version is returned. - `created_at` (datetime, required) - `updated_at` (datetime, required) - `last_used_at` (datetime, required) - `version_logs_count` (integer, required) — The number of logs that have been generated for this Evaluator Version - `total_logs_count` (integer, required) — The number of logs that have been generated across all Evaluator Versions - `inputs` (list of InputResponse, required) — Inputs associated to the Evaluator. Inputs correspond to any of the variables used within the Evaluator template. - `directory_id` (string, optional) — ID of the directory that the file is in on Humanloop. - `version_name` (string, optional) — Unique name for the Evaluator version. Version names must be unique for a given Evaluator. - `version_description` (string, optional) — Description of the version, e.g., the changes made in this version. - `description` (string, optional) — Description of the Evaluator. - `schema` (map from string to any, optional) — The JSON schema for the File. - `readme` (string, optional) — Long description of the file. - `tags` (list of string, optional) — List of tags associated with the file. - `type` ("evaluator", optional) - `environments` (list of EnvironmentResponse, optional) — The list of environments the Evaluator Version is deployed to. - `created_by` (any, optional) — The user who created the Evaluator. - `evaluators` (list of MonitoringEvaluatorResponse, optional) — Evaluators that have been attached to this Evaluator that are used for monitoring logs. - `evaluator_aggregates` (list of EvaluatorAggregate, optional) — Aggregation of Evaluator results for the Evaluator Version. - `attributes` (map from string to any, optional) — Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. ### VersionDeploymentResponse A variable reference to the Version deployed to an Environment - `file` (VersionDeploymentResponseFile, required) — The File that the deployed Version belongs to. - `environment` (EnvironmentResponse, required) — The Environment that the Version is deployed to. - `type` ("environment", required) ### VersionIdResponse A reference to a specific Version by its ID - `version` (VersionIdResponseVersion, required) — The specific Version being referenced. - `type` ("version", required) ### EvaluatorResponseSpec ### VersionDeploymentResponseFile The File that the deployed Version belongs to. ### VersionIdResponseVersion The specific Version being referenced. ### LlmEvaluatorRequest - `arguments_type` (enum, required) — Whether this Evaluator is target-free or target-required. - Allowed values: `target_free`, `target_required` - `return_type` (enum, required) — The type of the return value of the Evaluator. - Allowed values: `boolean`, `number`, `select`, `multi_select`, `text` - `evaluator_type` ("llm", required) - `attributes` (map from string to any, optional) — Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. - `options` (list of EvaluatorJudgmentOptionResponse, optional) — The options that can be applied as judgments. Only for Evaluators with `return_type` of 'boolean', 'select' or 'multi_select'. - `number_limits` (EvaluatorJudgmentNumberLimit, optional) — Limits on the judgment that can be applied. Only for Evaluators with `return_type` of 'number'. - `number_valence` (enum, optional) — The valence of the number judgment. Only for Evaluators with `return_type` of 'number'. If 'positive', a higher number is better. If 'negative', a lower number is better. - Allowed values: `positive`, `negative`, `neutral` - `prompt` (PromptKernelRequest, optional) — The prompt parameters used to generate. ### CodeEvaluatorRequest - `arguments_type` (enum, required) — Whether this Evaluator is target-free or target-required. - Allowed values: `target_free`, `target_required` - `return_type` (enum, required) — The type of the return value of the Evaluator. - Allowed values: `boolean`, `number`, `select`, `multi_select`, `text` - `evaluator_type` ("python", required) - `code` (string, required) — The code for the Evaluator. This code will be executed in a sandboxed environment. - `attributes` (map from string to any, optional) — Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. - `options` (list of EvaluatorJudgmentOptionResponse, optional) — The options that can be applied as judgments. Only for Evaluators with `return_type` of 'boolean', 'select' or 'multi_select'. - `number_limits` (EvaluatorJudgmentNumberLimit, optional) — Limits on the judgment that can be applied. Only for Evaluators with `return_type` of 'number'. - `number_valence` (enum, optional) — The valence of the number judgment. Only for Evaluators with `return_type` of 'number'. If 'positive', a higher number is better. If 'negative', a lower number is better. - Allowed values: `positive`, `negative`, `neutral` ### HumanEvaluatorRequest - `arguments_type` (enum, required) — Whether this Evaluator is target-free or target-required. - Allowed values: `target_free`, `target_required` - `return_type` (enum, required) — The type of the return value of the Evaluator. - Allowed values: `select`, `multi_select`, `text`, `number`, `boolean` - `evaluator_type` ("human", required) - `attributes` (map from string to any, optional) — Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. - `options` (list of EvaluatorJudgmentOptionResponse, optional) — The options that can be applied as judgments. - `number_limits` (EvaluatorJudgmentNumberLimit, optional) — Limits on the judgment that can be applied. Only for Evaluators with `return_type` of 'number'. - `number_valence` (enum, optional) — The valence of the number judgment. Only for Evaluators with `return_type` of 'number'. If 'positive', a higher number is better. If 'negative', a lower number is better. - Allowed values: `positive`, `negative`, `neutral` - `instructions` (string, optional) — Instructions and guidelines for applying judgments. ### ExternalEvaluatorRequest - `arguments_type` (enum, required) — Whether this Evaluator is target-free or target-required. - Allowed values: `target_free`, `target_required` - `return_type` (enum, required) — The type of the return value of the Evaluator. - Allowed values: `boolean`, `number`, `select`, `multi_select`, `text` - `evaluator_type` ("external", required) - `attributes` (map from string to any, optional) — Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. - `options` (list of EvaluatorJudgmentOptionResponse, optional) — The options that can be applied as judgments. Only for Evaluators with `return_type` of 'boolean', 'select' or 'multi_select'. - `number_limits` (EvaluatorJudgmentNumberLimit, optional) — Limits on the judgment that can be applied. Only for Evaluators with `return_type` of 'number'. - `number_valence` (enum, optional) — The valence of the number judgment. Only for Evaluators with `return_type` of 'number'. If 'positive', a higher number is better. If 'negative', a lower number is better. - Allowed values: `positive`, `negative`, `neutral` ### PromptResponse Base type that all File Responses should inherit from. Attributes defined here are common to all File Responses and should be overridden in the inheriting classes with documentation and appropriate Field definitions. - `path` (string, required) — Path of the Prompt, including the name, which is used as a unique identifier. - `id` (string, required) — Unique identifier for the Prompt. - `model` (string, required) — The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) - `name` (string, required) — Name of the Prompt. - `version_id` (string, required) — Unique identifier for the specific Prompt Version. If no query params provided, the default deployed Prompt Version is returned. - `created_at` (datetime, required) - `updated_at` (datetime, required) - `last_used_at` (datetime, required) - `version_logs_count` (integer, required) — The number of logs that have been generated for this Prompt Version - `total_logs_count` (integer, required) — The number of logs that have been generated across all Prompt Versions - `inputs` (list of InputResponse, required) — Inputs associated to the Prompt. Inputs correspond to any of the variables used within the Prompt template. - `directory_id` (string, optional) — ID of the directory that the file is in on Humanloop. - `endpoint` (enum, optional) — The provider model endpoint used. - Allowed values: `complete`, `chat`, `edit` - `template` (PromptResponseTemplate, optional) — The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`. - `template_language` (enum, optional) — The template language to use for rendering the template. - Allowed values: `default`, `jinja` - `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` (PromptResponseStop, 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. - `other` (map from string to any, optional) — Other parameter values to be passed to the provider call. - `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` (PromptResponseReasoningEffort, 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. - `tools` (list of ToolFunction, optional) — The tool specification that the model can choose to call if Tool calling is supported. - `linked_tools` (list of LinkedToolResponse, optional) — The tools linked to your prompt that the model can call. - `attributes` (map from string to any, optional) — Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. - `version_name` (string, optional) — Unique name for the Prompt version. Version names must be unique for a given Prompt. - `version_description` (string, optional) — Description of the version, e.g., the changes made in this version. - `description` (string, optional) — Description of the Prompt. - `tags` (list of string, optional) — List of tags associated with the file. - `readme` (string, optional) — Long description of the file. - `schema` (map from string to any, optional) — The JSON schema for the Prompt. - `type` ("prompt", optional) - `environments` (list of EnvironmentResponse, optional) — The list of environments the Prompt Version is deployed to. - `created_by` (any, optional) — The user who created the Prompt. - `evaluators` (list of MonitoringEvaluatorResponse, optional) — Evaluators that have been attached to this Prompt that are used for monitoring logs. - `evaluator_aggregates` (list of EvaluatorAggregate, optional) — Aggregation of Evaluator results for the Prompt Version. - `raw_file_content` (string, optional) — The raw content of the Prompt. Corresponds to the .prompt file. ### DatasetResponse Base type that all File Responses should inherit from. Attributes defined here are common to all File Responses and should be overridden in the inheriting classes with documentation and appropriate Field definitions. - `path` (string, required) — Path of the Dataset, including the name, which is used as a unique identifier. - `id` (string, required) — Unique identifier for the Dataset. Starts with `ds_`. - `name` (string, required) — Name of the Dataset, which is used as a unique identifier. - `version_id` (string, required) — Unique identifier for the specific Dataset Version. If no query params provided, the default deployed Dataset Version is returned. Starts with `dsv_`. - `created_at` (datetime, required) - `updated_at` (datetime, required) - `last_used_at` (datetime, required) - `datapoints_count` (integer, required) — The number of Datapoints in this Dataset version. - `directory_id` (string, optional) — ID of the directory that the file is in on Humanloop. - `description` (string, optional) — Description of the Dataset. - `schema` (map from string to any, optional) — The JSON schema for the File. - `readme` (string, optional) — Long description of the file. - `tags` (list of string, optional) — List of tags associated with the file. - `type` ("dataset", optional) - `environments` (list of EnvironmentResponse, optional) — The list of environments the Dataset Version is deployed to. - `created_by` (any, optional) — The user who created the Dataset. - `version_name` (string, optional) — Unique name for the Dataset version. Version names must be unique for a given Dataset. - `version_description` (string, optional) — Description of the version, e.g., the changes made in this version. - `datapoints` (list of DatapointResponse, optional) — The list of Datapoints in this Dataset version. Only provided if explicitly requested. - `attributes` (map from string to any, optional) — Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used. ### FlowResponse Response model for a Flow. - `path` (string, required) — Path of the Flow, including the name, which is used as a unique identifier. - `id` (string, required) — Unique identifier for the Flow. - `attributes` (map from string to any, required) — A key-value object identifying the Flow Version. - `name` (string, required) — Name of the Flow. - `version_id` (string, required) — Unique identifier for the specific Flow Version. If no query params provided, the default deployed Flow Version is returned. - `created_at` (datetime, required) - `updated_at` (datetime, required) - `last_used_at` (datetime, required) - `version_logs_count` (integer, required) — The number of logs that have been generated for this Flow Version - `directory_id` (string, optional) — ID of the directory that the file is in on Humanloop. - `version_name` (string, optional) — Unique name for the Flow version. Version names must be unique for a given Flow. - `version_description` (string, optional) — Description of the Version. - `description` (string, optional) — Description of the Flow. - `schema` (map from string to any, optional) — The JSON schema for the File. - `readme` (string, optional) — Long description of the file. - `tags` (list of string, optional) — List of tags associated with the file. - `type` ("flow", optional) - `environments` (list of EnvironmentResponse, optional) — The list of environments the Flow Version is deployed to. - `created_by` (any, optional) — The user who created the Flow. - `evaluator_aggregates` (list of EvaluatorAggregate, optional) — Aggregation of Evaluator results for the Flow Version. - `evaluators` (list of MonitoringEvaluatorResponse, optional) — The list of Monitoring Evaluators associated with the Flow Version. ### AgentResponse Base type that all File Responses should inherit from. Attributes defined here are common to all File Responses and should be overridden in the inheriting classes with documentation and appropriate Field definitions. - `path` (string, required) — Path of the Agent, including the name, which is used as a unique identifier. - `id` (string, required) — Unique identifier for the Agent. - `model` (string, required) — The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) - `tools` (list of AgentResponseToolsItem, required) — List of tools that the Agent can call. These can be linked files or inline tools. - `name` (string, required) — Name of the Agent. - `version_id` (string, required) — Unique identifier for the specific Agent Version. If no query params provided, the default deployed Agent Version is returned. - `created_at` (datetime, required) - `updated_at` (datetime, required) - `status` (enum, required) — The status of the Agent Version. - Allowed values: `uncommitted`, `committed`, `deleted` - `last_used_at` (datetime, required) - `version_logs_count` (integer, required) — The number of logs that have been generated for this Agent Version - `total_logs_count` (integer, required) — The number of logs that have been generated across all Agent Versions - `inputs` (list of InputResponse, required) — Inputs associated to the Agent. Inputs correspond to any of the variables used within the Agent template. - `directory_id` (string, optional) — ID of the directory that the file is in on Humanloop. - `endpoint` (enum, optional) — The provider model endpoint used. - Allowed values: `complete`, `chat`, `edit` - `template` (AgentResponseTemplate, optional) — The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`. - `template_language` (enum, optional) — The template language to use for rendering the template. - Allowed values: `default`, `jinja` - `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` (AgentResponseStop, 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. - `other` (map from string to any, optional) — Other parameter values to be passed to the provider call. - `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` (AgentResponseReasoningEffort, 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. - `attributes` (map from string to any, optional) — Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. - `max_iterations` (integer, optional) — The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called. - `version_name` (string, optional) — Unique name for the Agent version. Version names must be unique for a given Agent. - `version_description` (string, optional) — Description of the version, e.g., the changes made in this version. - `description` (string, optional) — Description of the Agent. - `tags` (list of string, optional) — List of tags associated with the file. - `readme` (string, optional) — Long description of the file. - `schema` (map from string to any, optional) — The JSON schema for the Prompt. - `type` ("agent", optional) - `environments` (list of EnvironmentResponse, optional) — The list of environments the Agent Version is deployed to. - `created_by` (any, optional) — The user who created the Agent. - `committed_by` (any, optional) — The user who committed the Agent Version. - `committed_at` (datetime, optional) — The date and time the Agent Version was committed. - `evaluators` (list of MonitoringEvaluatorResponse, optional) — Evaluators that have been attached to this Agent that are used for monitoring logs. - `evaluator_aggregates` (list of EvaluatorAggregate, optional) — Aggregation of Evaluator results for the Agent Version. - `raw_file_content` (string, optional) — The raw content of the Agent. Corresponds to the .agent file. ### EvaluatorJudgmentOptionResponse - `name` (string, required) — The name of the option. - `valence` (enum, optional) — Whether this option should be considered positive or negative. - Allowed values: `positive`, `negative`, `neutral` ### EvaluatorJudgmentNumberLimit - `min` (double, optional) — The minimum value that can be selected. - `max` (double, optional) — The maximum value that can be selected. - `step` (double, optional) — The step size for the number input. ### PromptKernelRequest Base class used by both PromptKernelRequest and AgentKernelRequest. Contains the consistent Prompt-related fields. - `model` (string, required) — The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) - `endpoint` (enum, optional) — The provider model endpoint used. - Allowed values: `complete`, `chat`, `edit` - `template` (PromptKernelRequestTemplate, optional) — The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`. - `template_language` (enum, optional) — The template language to use for rendering the template. - Allowed values: `default`, `jinja` - `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` (PromptKernelRequestStop, 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. - `other` (map from string to any, optional) — Other parameter values to be passed to the provider call. - `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` (PromptKernelRequestReasoningEffort, 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. - `tools` (list of ToolFunction, optional) — The tool specification that the model can choose to call if Tool calling is supported. - `linked_tools` (list of string, optional) — The IDs of the Tools in your organization that the model can choose to call if Tool calling is supported. The default deployed version of that tool is called. - `attributes` (map from string to any, optional) — Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. ### PromptResponseTemplate The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`. ### PromptResponseStop 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. ### PromptResponseReasoningEffort 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. ### LinkedToolResponse - `name` (string, required) — Name for the tool referenced by the model. - `description` (string, required) — Description of the tool referenced by the model - `id` (string, required) — Unique identifier for the Tool linked. - `version_id` (string, required) — Unique identifier for the Tool Version linked. - `strict` (boolean, optional, default: false) — If true, forces the model to output json data in the structure of the parameters schema. - `parameters` (map from string to any, optional) — Parameters needed to run the Tool, defined in JSON Schema format: https://json-schema.org/ ### DatapointResponse - `id` (string, required) — Unique identifier for the Datapoint. Starts with `dp_`. - `inputs` (map from string to string, optional) — The inputs to the prompt template. - `messages` (list of ChatMessage, optional) — List of chat messages to provide to the model. - `target` (map from string to DatapointResponseTargetValue, optional) — Object with criteria necessary to evaluate generations with this Datapoint. This is passed in as an argument to Evaluators when used in an Evaluation. ### AgentResponseToolsItem ### AgentResponseTemplate The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`. ### AgentResponseStop The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. ### AgentResponseReasoningEffort 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. ### PromptKernelRequestTemplate The template contains the main structure and instructions for the model, including input variables for dynamic values. For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. For completion models, provide a prompt template as a string. Input variables should be specified with double curly bracket syntax: `{{input_name}}`. ### PromptKernelRequestStop The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. ### PromptKernelRequestReasoningEffort 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. ### ChatMessage - `role` (enum, required) — Role of the message author. - Allowed values: `user`, `assistant`, `system`, `tool`, `developer` - `content` (ChatMessageContent, 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 ChatMessageThinkingItem, optional) — Model's chain-of-thought for providing the response. Present on assistant messages if model supports it. ### DatapointResponseTargetValue ### AgentLinkedFileResponse - `type` ("file", required) - `link` (LinkedFileRequest, required) - `on_agent_call` (enum, optional) — What an Agent should do when calling a Tool. - Allowed values: `stop`, `continue` - `file` (AgentLinkedFileResponseFile, optional) ### AgentInlineTool - `type` ("inline", required) - `json_schema` (ToolFunction, required) - `on_agent_call` (enum, optional) — What an Agent should do when calling a Tool. - Allowed values: `stop`, `continue` ### ChatMessageContent 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. ### ChatMessageThinkingItem ### LinkedFileRequest - `file_id` (string, required) - `environment_id` (string, optional) - `version_id` (string, optional) ### AgentLinkedFileResponseFile ### FunctionTool A function tool to be called by the model where user owns runtime. - `name` (string, required) - `arguments` (string, optional) ### AnthropicThinkingContent - `type` ("thinking", required) - `thinking` (string, required) — Model's chain-of-thought for providing the response. - `signature` (string, required) — Cryptographic signature that verifies the thinking block was generated by Anthropic. ### AnthropicRedactedThinkingContent - `type` ("redacted_thinking", required) - `data` (string, required) — Thinking block Anthropic redacted for safety reasons. User is expected to pass the block back to Anthropic ## Examples **Response** ```json { "records": [ { "path": "math-tool", "id": "tl_789ghi", "name": "math-tool", "version_id": "tv_012jkl", "created_at": "2024-05-01T12:00:00Z", "updated_at": "2024-05-01T12:00:00Z", "last_used_at": "2024-05-01T12:00:00Z", "version_logs_count": 1, "total_logs_count": 1, "inputs": [ { "name": "operation" } ], "version_name": "math-tool-v1", "version_description": "Simple math tool that multiplies two numbers", "type": "tool" } ] } ``` **SDK Code** ```python List versions import requests url = "https://api.humanloop.com/v5/tools/tl_789ghi/versions" headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```typescript List versions import { HumanloopClient } from "humanloop"; const client = new HumanloopClient({ apiKey: "YOUR_API_KEY" }); await client.tools.listVersions("tl_789ghi"); ``` ```go List versions package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.humanloop.com/v5/tools/tl_789ghi/versions" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby List versions require 'uri' require 'net/http' url = URI("https://api.humanloop.com/v5/tools/tl_789ghi/versions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java List versions import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.humanloop.com/v5/tools/tl_789ghi/versions") .header("X-API-KEY", "") .asString(); ``` ```php List versions request('GET', 'https://api.humanloop.com/v5/tools/tl_789ghi/versions', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp List versions using RestSharp; var client = new RestClient("https://api.humanloop.com/v5/tools/tl_789ghi/versions"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift List versions import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.humanloop.com/v5/tools/tl_789ghi/versions")! 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() ```