> ## Documentation Index
> Fetch the complete documentation index at: https://betterdatainc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Gateway & Registry API Reference

> Complete API documentation for AI Gateway and Commerce Registry

# AI Gateway & Registry API Reference

Complete API documentation for the Better Data AI Gateway and Commerce Registry.

## Base URLs

* **Gateway**: `https://gateway.betterdata.co`
* **Registry**: `https://registry.betterdata.co`

## Authentication

All requests require authentication via API key:

```
Authorization: Bearer YOUR_API_KEY
```

Get your API key from [app.betterdata.co/settings/api-keys](https://app.betterdata.co/settings/api-keys)

## Gateway Endpoints

### List Available Tools

`GET /v1/{gateway_id}/tools`

Get available tools for a specific AI provider.

**Query Parameters:**

* `provider` (required): `claude` | `openai` | `grok` | `gemini`
* `session_id` (optional): Session identifier

**Response:**

```json theme={null}
{
  "tools": [
    {
      "name": "search_products",
      "description": "Search for products",
      "parameters": {
        "type": "object",
        "properties": {
          "query": { "type": "string" },
          "limit": { "type": "number" }
        }
      }
    }
  ]
}
```

### Execute Tool

`POST /v1/{gateway_id}/tools/execute`

Execute a tool with the specified provider.

**Request Body:**

```json theme={null}
{
  "provider": "claude",
  "tool_name": "search_products",
  "input": {
    "query": "lipstick",
    "limit": 10
  },
  "session_id": "session-123"
}
```

## Registry Endpoints

### Register Gateway

`POST /api/gateways`

Register a new gateway in the Commerce Registry.

### Get Gateway

`GET /api/gateways/{gateway_id}`

Get gateway registration details.

### Search Gateways

`GET /api/gateways/search`

Search for gateways by brand, domain, or GTIN.

**Query Parameters:**

* `q`: Search query
* `category`: Filter by category
* `verified`: Filter by verification status

***

## Related Pages

* [Getting Started](/hosted/ai-registry/getting-started)
* [Self-Hosting](/open-source/self-hosting)
