> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/integration-examples/agents-and-automations/make-com.md).

# Make.com

Add Cortecs models to automated Make.com scenarios

[Make](https://www.make.com/) is a visual automation platform for connecting applications and processing data. You can call Cortecs from any Make scenario with the HTTP app and use the generated response in later modules.

{% hint style="info" %}
Before you begin, create a Cortecs API key by following the [Member quickstart](/member-quickstart.md) and choose a model from the [model catalog](https://cortecs.ai/serverlessModels).
{% endhint %}

## 1. Add the HTTP module

Create or open a scenario, select **Add another module**, and choose **HTTP > Make a request**. Use the current HTTP app rather than **HTTP (legacy)**.

## 2. Create a reusable Cortecs keychain

In the HTTP module, configure authentication as follows:

| Field                  | Value                         |
| ---------------------- | ----------------------------- |
| Authentication type    | **API key**                   |
| Key                    | `Bearer your_cortecs_api_key` |
| API key placement      | **In the header**             |
| API key parameter name | `Authorization`               |

Save the credentials with a recognizable name such as `Cortecs API`. Make stores the key in a reusable keychain, so you do not need to paste it into each request.

{% hint style="warning" %}
Include `Bearer` and one space before the API key in the **Key** field. Never place an API key in the request body, a public scenario blueprint, or a screenshot.
{% endhint %}

## 3. Configure a Chat Completions request

Enter these request settings:

| Field             | Value                                        |
| ----------------- | -------------------------------------------- |
| URL               | `https://api.cortecs.ai/v1/chat/completions` |
| Method            | `POST`                                       |
| Body content type | `application/json`                           |
| Body input method | **JSON string**                              |
| Parse response    | **Yes**                                      |

Use the following request body and replace `<MODEL_ID>` with an exact ID from the [model catalog](https://cortecs.ai/serverlessModels):

```json
{
  "model": "<MODEL_ID>",
  "messages": [
    {
      "role": "system",
      "content": "You are a concise assistant."
    },
    {
      "role": "user",
      "content": "Summarize this text: {{1.text}}"
    }
  ]
}
```

Replace `{{1.text}}` with mapped output from the module that precedes the HTTP request. You can also remove the system message or change the prompt for your workflow.

## 4. Run the module once

Select **Run once** and provide data to the trigger module. A successful request returns a `200` response and a parsed response body.

Running the module once also lets Make learn the response structure. In a later module, map the assistant text from **Body > choices\[] > message > content**.

For example, a scenario that drafts replies could follow this pattern:

```
Email trigger → HTTP (Cortecs) → Create draft
```

## Optional: use structured output

For workflows that must pass predictable data to later modules, ask the model to return JSON and describe the required keys clearly in the prompt. Then use **JSON > Parse JSON** after the HTTP module to validate and map the result.

When available for the selected model, you can instead use Cortecs [Structured Outputs](/examples/structured-outputs.md) to enforce a JSON schema at the API level.

## Troubleshooting

### `401 Unauthorized`

Edit the HTTP keychain and confirm that the key value begins with `Bearer`, followed by a space and a valid Cortecs API key. The API key parameter name must be `Authorization`.

### `404 Not Found`

Confirm that the request URL is exactly `https://api.cortecs.ai/v1/chat/completions` and that the model ID matches the [model catalog](https://cortecs.ai/serverlessModels).

### The request body is invalid

Set the body content type to `application/json`. Check mapped text for unescaped quotation marks or line breaks. Make's data-structure body editor or a **JSON > Create JSON** module can help construct valid JSON when the mapped input is complex.

### Response fields are not available for mapping

Enable **Parse response**, save the module, and run it once successfully. Make can then expose the response fields to subsequent modules.

### Requests are rate limited

Add an error handler to the HTTP module and retry after a delay. For high-volume scenarios, process records in controlled batches and avoid immediate repeated retries.

For endpoint details, see the Cortecs [Chat Completions API](/api/chat-completions.md). For HTTP module fields and authentication options, see Make's [HTTP app documentation](https://apps.make.com/http) and [API key authentication guide](https://apps.make.com/api-key-authentication-type).
