# API

Connect your Chatlayer [Table](/navigation/tables.md) with your API to your database.

{% hint style="warning" %}
For importing more than 100 records, using an API is recommended over manual data import.
{% endhint %}

{% hint style="danger" %}
Please note that Tables cannot be exported at[ bot export](/navigation/settings/import-export.md) yet.
{% endhint %}

{% hint style="info" %}
Please find the API documentation and authorization [here](https://gateway.prod.europe-west1.gc.chatlayer.ai/api/v1/docs/static/index.html).&#x20;
{% endhint %}

## How to authenticate

The API requires basic authentication. Follow these guidelines to find the username and password when making an API request.

1. Go to **Settings.**&#x20;
2. Click on **Access tokens.**
3. From the top-right corner, click on **Generate token.**
4. Enter a **Token name**.

<figure><img src="/files/l7n0JBe8C3mQGMYVE8ZS" alt=""><figcaption></figcaption></figure>

5. Click on **Create.**
6. **Copy** the token.

{% hint style="info" %}
A token consists of a username and a password. For example, the following is a generated token:

`66830fb161b3c29143f32705:78b3e20492db13584eE52C556F99a5d2`

The part before the colon (:) is the **username**, and the part after the colon is the **password**.

User name: `66830fb161b3c29143f32705`

`Password:78b3e20492db13584eE52C556F99a5d2`
{% endhint %}

{% hint style="info" %}
For the base URL, please use\
EU: <https://gateway.prod.europe-west1.gc.chatlayer.ai/api/v1>\
US: <https://gateway.prod.us-east4.gcp.chatlayer.ai/api/v1>\
SA: <https://gateway.prod.sa-east1.gcp.chatlayer.ai/api/v1>\
ASIA: <https://gateway.prod.asia-south1.gcp.chatlayer.ai>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatlayer.ai/navigation/tables/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
