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

# Introduction

> Understand general concepts, response codes, and authentication strategies.

The Lasso API is built on REST principles. All requests use HTTPS and return JSON responses.

Use Lasso to **search** for products, **enrich** partial data into complete records, **extract** structured data from files, and **enhance** it with AI — all through a single API.

## Base URL

All requests contain the following base URL:

```
https://hub.banditshq.com/api/v1
```

## Quick examples

The fastest way to use Lasso — no setup required:

<CodeGroup>
  ```bash Search for products theme={null}
  curl -X POST "https://hub.banditshq.com/api/v1/search" \
    -H "Authorization: Bearer lasso_..." \
    -H "Content-Type: application/json" \
    -d '{ "query": "Sony wireless earbuds under $200" }'
  ```

  ```bash Enrich product data theme={null}
  curl -X POST "https://hub.banditshq.com/api/v1/enrich" \
    -H "Authorization: Bearer lasso_..." \
    -H "Content-Type: application/json" \
    -d '{ "items": [{ "data": { "name": "Sony WF-1000XM5" } }] }'
  ```
</CodeGroup>

## Authentication

To authenticate you need to add an `Authorization` header with the contents of the header being `Bearer lasso_xxxxxxxxx` where `lasso_xxxxxxxxx` is your [API Key](https://hub.banditshq.com).

```
Authorization: Bearer lasso_xxxxxxxxx
```

API keys are scoped to a single company. All resources accessed through a key belong to that company. See the [Authentication](/api-reference/authentication) page for more details on key management and security best practices.

## SDKs

Official SDKs are available for TypeScript and Python.

<CodeGroup>
  ```bash npm theme={null}
  npm install @lasso-ai/sdk
  ```

  ```bash pip theme={null}
  pip install lasso-ai
  ```
</CodeGroup>

<CodeGroup>
  ```typescript TypeScript theme={null}
  import LassoClient from "@lasso-ai/sdk";

  const client = new LassoClient({ apiKey: "lasso_..." });

  // Search
  const results = await client.search({ query: "wireless earbuds" });

  // Enrich
  const enriched = await client.enrich({
    items: [{ data: { name: "Sony WF-1000XM5" } }],
  });
  ```

  ```python Python theme={null}
  from lasso import LassoClient

  client = LassoClient(api_key="lasso_...")

  # Search
  results = client.search(query="wireless earbuds")

  # Enrich
  enriched = client.enrich(items=[{"data": {"name": "Sony WF-1000XM5"}}])
  ```
</CodeGroup>

## Response codes

Lasso uses standard HTTP codes to indicate the success or failure of your requests.

| Status | Type                   | Description                                                     |
| ------ | ---------------------- | --------------------------------------------------------------- |
| `200`  | Success                | Successful request.                                             |
| `201`  | Created                | Resource successfully created.                                  |
| `202`  | Accepted               | Async job queued (search, enrich, enhance).                     |
| `204`  | No Content             | Successful deletion.                                            |
| `400`  | `invalid_request`      | The request is malformed or uses an unsupported HTTP method.    |
| `401`  | `unauthenticated`      | Missing, invalid, or deactivated API key.                       |
| `402`  | `insufficient_credits` | Your account does not have enough credits.                      |
| `403`  | `forbidden`            | The API key does not have permission for this action.           |
| `404`  | `not_found`            | The resource does not exist or does not belong to your company. |
| `409`  | `conflict`             | The request conflicts with the current state of the resource.   |
| `422`  | `validation_error`     | Missing required fields or invalid values.                      |
| `429`  | `rate_limited`         | Too many requests. Back off and retry.                          |
| `500`  | `internal_error`       | An unexpected error on the server.                              |

See [Errors](/api-reference/errors) for the full error response format.

## Pagination

List endpoints support page-based pagination with `page` and `limit` query parameters. The default page size is 25 and the maximum is 100.

```json theme={null}
{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 143
  }
}
```

See [Pagination](/api-reference/pagination) for details and iteration examples.

## Webhooks

Configure a `webhook_url` on search, enrich, or table creation to receive HTTP POST notifications when processing completes. Webhook payloads are signed with HMAC-SHA256 and retried up to 3 times with exponential backoff.

See [Webhooks](/api-reference/webhooks) for delivery format, signature verification, and retry policy.
