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

# Use API nodes within chains

> Make external API calls at any point in your Prompt Chain to integrate with third-party services. The API node lets you validate data, log events, fetch information, or perform any HTTP request without leaving your chain. Simply configure the endpoint, method, and payload to connect your AI workflow with external systems.

### Configuring API nodes

<Steps>
  <Step title="Create an API node">
    1. Drag from any existing node to create a connection or drop an API node from the add node selection
    2. Select API from the node type menu

           <img src="https://mintcdn.com/maximai/xP8Yv_VjZfosz7nU/images/docs/evaluate/how-to/prompt-chains/add-api-node.png?fit=max&auto=format&n=xP8Yv_VjZfosz7nU&q=85&s=7e34458127e1c8cce23c1d629a191305" alt="Add API node" width="1142" height="638" data-path="images/docs/evaluate/how-to/prompt-chains/add-api-node.png" />
  </Step>

  <Step title="Edit API node">
    * Click the <Icon icon="pencil" /> icon in the top-right corner of the node.

          <img src="https://mintcdn.com/maximai/xP8Yv_VjZfosz7nU/images/docs/evaluate/how-to/prompt-chains/edit-api-node.png?fit=max&auto=format&n=xP8Yv_VjZfosz7nU&q=85&s=9c30fb052cf74407eb0bceab63498631" alt="Edit API node" width="2014" height="1098" data-path="images/docs/evaluate/how-to/prompt-chains/edit-api-node.png" />
  </Step>

  <Step title="API node editor">
    Configure HTTP API requests with standard parameters and custom scripts. The editor provides a complete interface to set up your API endpoints.

    Request configuration

    * Select HTTP methods (GET, POST, PUT, DELETE)
    * Add request headers
    * Configure query parameters
    * Define request body

    Advanced options

    * Write pre-request scripts to modify request parameters.
    * Add post-response scripts to transform API responses.
    * Test API calls directly from the editor.

          <img src="https://mintcdn.com/maximai/xP8Yv_VjZfosz7nU/images/docs/evaluate/how-to/prompt-chains/api-node-editor.png?fit=max&auto=format&n=xP8Yv_VjZfosz7nU&q=85&s=b690e5d24055b1e683b199d18b91ad7c" alt="Edit API node" width="2410" height="1226" data-path="images/docs/evaluate/how-to/prompt-chains/api-node-editor.png" />
  </Step>
</Steps>

### Using variables

Use variables in the request body, query parameters and headers using the `{{ variable_name }}` syntax.

<img src="https://mintcdn.com/maximai/xP8Yv_VjZfosz7nU/images/docs/evaluate/how-to/prompt-chains/api-node-variables.png?fit=max&auto=format&n=xP8Yv_VjZfosz7nU&q=85&s=5847107fcb5be3efdaa49b316dade381" alt="Variables in API node" width="2612" height="1422" data-path="images/docs/evaluate/how-to/prompt-chains/api-node-variables.png" />
