> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/navigation/tables/api.md).

# API

Connect your Table with your 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).
{% 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.**
2. Click on **Access tokens.**
3. From the top-right corner, click on **Generate token.**
4. Enter a **Token name**.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FmVJYY9bcT11aWce2H7el%2FScreenshot%202024-07-01%20at%2022.19.53.png?alt=media&amp;token=b0671974-5016-46b1-86d4-d3f757a74ac2" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
