> For the complete documentation index, see [llms.txt](https://docs.hetu.org/parallel-net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hetu.org/parallel-net/agent-integration-guide.md).

# Agent Integration Guide

This document describes the integration process for connecting your Agent API with the Hetu Parallel Network.

#### Introduction

We provide a chat front-end interface where users can interact with your agent. You can **purchase API credits** and obtain an **API key** from us.\
Your rewards (credit) will be distributed based on the **amount of AI token credits** you purchase.

#### Step 1: Purchase and Get Your API Key

<figure><img src="https://1328765140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKE0rE97ztaM2iJ266VAf%2Fuploads%2F8TXVVcTPUjH866YKzkeH%2Fimage.png?alt=media&amp;token=ff7d4f2b-ebfc-4229-b993-ccbb5fdbb233" alt=""><figcaption></figcaption></figure>

Visit the management panel: <https://parallel.hetu.org/parallel>. Buy AI token credit and get your API key on the 'API keys' page.

Base URL: <https://aiclub.v1.hetu.org/v1/chat/completions>

#### Step 2: Create the Agent API Request and Response Structure

Example (curl):

```
curl https://aiclub.v1.hetu.org/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{
    "model": "gemini-2.0-flash",
    "messages": [
      { "role": "user", "content": "Hello!" }
    ]
  }'

```

Request Body (JSON):&#x20;

```
{
  "model": "model_name",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}

```

Response Body (Success)

```
{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      }
    }
  ]
}

```

**Key Fields:**

* `choices`: Array of generated responses (use the first item, index = 0)
* Each `message` object must include:
  * `role` (string)
  * `content` (string)

***

Response Body (Error)

```
{
  "error": {
    "message": "Insufficient user quota, remaining balance: ＄0.000000 (request id: 20251030201406817524220WPJglmiV)",
    "type": "new_api_error",
    "param": "",
    "code": "insufficient_user_quota"
  }
}

```

**Key Fields:**

* `message`: Error message description
* `type`: Error type
* `param`: Error parameter (if any)
* `code`: Error code identifier

***

#### Step 3: Configure Agent in the Parallel Page

Visit parallel management page: <https://parallel.hetu.org/parallel>

![](https://1328765140-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKE0rE97ztaM2iJ266VAf%2Fuploads%2FW4sBSM0Sp093psXgB16m%2Funknown.png?alt=media\&token=53d9f0fb-2471-48ba-ab65-c95cc8994245)

In the Agent panel on the Parallel page, fill in the required information:

* Base URL: Remote Agent URL (example: <https://aiclub.v1.hetu.org/v1/chat/completions>)
* API Key: The key you obtained (used only for testing purposes; not stored on our backend)
* Model Name: Name of the model

Currently supported models include: gpt-4.1-nano, gpt-4o-mini, gpt-5-nano, gemini-2.0-flash, deepseek-chat-v3-0324, grok-4-fast

***

After entering Remote Agent URL and Model Name, click SAVE AGENT to complete configuration.\
To test the setup, click TEST.

#### Step 4: Check your agent&#x20;

\
Visit the chat page: <https://parallel.hetu.org/chat/Sally%20A1C>.&#x20;

Check if your agent is live.
