> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

> Learn how to use environments to manage different configurations for your API requests and responses. This page covers referencing environment variables and integrating them into your HTTP endpoint workflows.

export const MaximPlayer = ({url}) => {
  return <iframe className="border-background-highlight-secondary h-full w-full rounded-md border-2 aspect-video" src={url} allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>;
};

## How to use environments in your HTTP endpoint?

You can use [environments](/settings/environment) to dynamically replace the variables in your API requests and responses.

1. Select the environment you want to use from the dropdown in the top right corner of the playground.
   <img src="https://mintcdn.com/maximai/-_rjhXQW-VMacTcq/images/docs/evaluate/workflow/http_workflow/environment_selector.png?fit=max&auto=format&n=-_rjhXQW-VMacTcq&q=85&s=fd6e4c66918ce00c4c37c09c4487d90b" alt="Environment dropdown" width="862" height="524" data-path="images/docs/evaluate/workflow/http_workflow/environment_selector.png" />
2. Use the `{{env.key_name}}` syntax to access the variables in the headers and parameters of your API request.
   <img src="https://mintcdn.com/maximai/-_rjhXQW-VMacTcq/images/docs/evaluate/workflow/http_workflow/env_variable_selector.png?fit=max&auto=format&n=-_rjhXQW-VMacTcq&q=85&s=59a8d7210389a40f4151b18c8e7416bb" alt="Environment variables" width="2900" height="1196" data-path="images/docs/evaluate/workflow/http_workflow/env_variable_selector.png" />
3. You can also use the `maxim.getEnvironmentVariable("key_name")` method in your scripts to access the variables.

See it in action:

<MaximPlayer url="https://drive.google.com/file/d/1YkW_XzaYFVS1_UE6N3NxGiykjT6B98gN/preview" />
