> ## Documentation Index
> Fetch the complete documentation index at: https://syncupai-claude-update-docs-terminology-g7r40.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Workbook Agents in the API

> Create an agent in a workbook, enable it for API use, and manage versions

## Overview

This guide walks through creating a workbook agent called **Attraction Rating** (rates attractions on a 1-10 scale), enabling it for API use, and managing versions.

## 1) Create the agent in a workbook

Open the agent pane and create a new agent.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image1.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=0dca2af0b3281ba89e1d3d64cc0631b0" alt="Create a new agent from the agent pane" width="2636" height="1494" data-path="images/api_agents/image1.png" />

Add the prompt, then scroll down and click **Add column**.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image2.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=56b3c5999f1bedd8b34cb711ebdb48cc" alt="Enter the prompt and click Add column" width="2628" height="1488" data-path="images/api_agents/image2.png" />

## 2) Edit the agent settings

After the column is added to the table, click the column header and select **Edit agent**.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image3.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=6013d79ff4e5a5a382a3277a3e8394aa" alt="Open the column menu and choose Edit agent" width="2634" height="1490" data-path="images/api_agents/image3.png" />

## 3) Enable API usage

In the agent editor, click **Advanced** and then click **Use in API**.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image4.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=2cba02bd0fac8795141badb77b21c6c0" alt="Advanced settings with the Use in API button" width="2648" height="1492" data-path="images/api_agents/image4.png" />

This opens the API enablement panel. You can add a description and optionally rename the API attribute. This is a preview of the agent you are adding.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image5.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=37561b306a47c4730dc9e2088077b201" alt="Enable API usage panel with name and description" width="2644" height="1488" data-path="images/api_agents/image5.png" />

Scroll down and click **Enable API usage**.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image6.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=73878b644cc481def70070b17c377e21" alt="Enable API usage button" width="2642" height="1482" data-path="images/api_agents/image6.png" />

Once enabled, you will see a confirmation that it is ready to use.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image7.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=d3170d56159df38da4de18eed192e351" alt="API usage enabled confirmation" width="2640" height="1490" data-path="images/api_agents/image7.png" />

## 4) Call the agent from the API

Use the `attribute_key` shown in the UI with the `/enrich` endpoint.

<CodeGroup>
  ```bash cURL theme={null}
  # Use the default version (no version param)
  curl --request POST \
    --url https://api.reprompt.io/v2/enrich \
    --header 'Authorization: Bearer {YOUR_API_KEY}' \
    --header 'Content-Type: application/json' \
    --data '{
      "attribute_key": "attraction_rating",
      "inputs": {
        "name": "Golden Gate Bridge",
        "full_address": "Golden Gate Bridge, San Francisco, CA"
      }
    }'
  ```

  ```bash cURL theme={null}
  # Call a specific version
  curl --request POST \
    --url 'https://api.reprompt.io/v2/enrich?version=1' \
    --header 'Authorization: Bearer {YOUR_API_KEY}' \
    --header 'Content-Type: application/json' \
    --data '{
      "attribute_key": "attraction_rating",
      "inputs": {
        "name": "Golden Gate Bridge",
        "full_address": "Golden Gate Bridge, San Francisco, CA"
      }
    }'
  ```
</CodeGroup>

## 5) Edit the agent and create a new version

To make changes, return to the agent editor, update the prompt, and click **Use in API** again. The text below will show which version you are about to create (for example, “will save as version 2 of Attraction Rating”).

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image8.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=0f0a18d565c7b0db8ae80439bb606cdd" alt="Edit agent prompt and see the next version number" width="2642" height="1492" data-path="images/api_agents/image8.png" />

Click **Save**. The confirmation will show which version will be saved.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image9.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=cb34813a97f3ed45a488405efc949766" alt="Save new version confirmation" width="2638" height="1486" data-path="images/api_agents/image9.png" />

After saving, the agent is ready to use. Any API callers **without** a version parameter will now use the **default** version.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image10.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=9002923db9b0037764399f7ed60e6baf" alt="Agent ready to use with default version behavior" width="2638" height="1488" data-path="images/api_agents/image10.png" />

## 6) Manage default versions

Click **Saved enrichments** to view all versions. The default version is labeled and shows **API enabled**.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image11.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=bf40ad40288a55d9a680e41a3251d119" alt="Saved enrichments showing default version and API enabled status" width="2644" height="1490" data-path="images/api_agents/image11.png" />

To change the default, find the version you want and click **Set as default**.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image12.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=05d904809388c474a22aa7a00b7e2a1a" alt="Set a different version as default" width="2644" height="1498" data-path="images/api_agents/image12.png" />

The header updates to show the new default. Calls without a version parameter will now use this version.

<img src="https://mintcdn.com/syncupai-claude-update-docs-terminology-g7r40/qBTPTH18XdxHg3hY/images/api_agents/image13.png?fit=max&auto=format&n=qBTPTH18XdxHg3hY&q=85&s=ef4c26bf03321852b65e3e5d548eab63" alt="Default version updated in the header" width="2642" height="1494" data-path="images/api_agents/image13.png" />
