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

# Public API

All ABV data and features are available via the API.

**Path**

```text theme={null}
/api/public
```

**US**

```text theme={null}
https://app.abv.dev/api/public
```

**EU**

```text theme={null}
https://eu.app.abv.dev/api/public
```

References:

* [API Reference](https://api.reference.abv.dev)
* [OpenAPI spec](https://app.abv.dev/api/public/openapi.json)
* [Postman collection](https://app.abv.dev/api/public/postman.json)

# Authentication

Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). The API key is available in the ABV project settings.

* Username: ABV Public Key
* Password: ABV Secret Key

Example:

```bash theme={null}
curl -u public-key:api-key https://app.abv.dev/api/public/projects
```

# Access via SDKs

Both the ABV [Python SDK](/developer/sdks/python/overview) and the [JS/TS SDK](/developer/sdks/js-ts/overview) provide a strongly-typed wrapper around our public REST API for your convenience. The API methods are accessible via the `api` property on the ABV client instance in both SDKs.

You can use your editor's Intellisense to explore the API methods and their parameters.

<Info>
  When fetching [prompts](/developer/prompt-management/get-started), please use the `get_prompt` (Python) / `getPrompt` (JS/TS) methods on the ABV client to benefit from client-side caching, automatic retries, and fallbacks.
</Info>

### Python SDK

Install package

```bash theme={null}
pip install abvdev
```

```python theme={null}
from abvdev import ABV

abv = ABV(
    api_key="sk-abv-...", # your api key here
    host="https://app.abv.dev", # host="https://eu.app.abv.dev", for EU region
)
...
# fetch a trace
abv.api.trace.get(trace_id)

# async client via asyncio
await abv.async_api.trace(trace_id)

# explore more endpoints via Intellisense
abv.api.*
await abv.async_api.*
```

### JS/TS SDK

```bash theme={null}
npm i @abvdev/client 
```

**Environment variables**

Add your ABV credentials as environment variables, e.g. use .env file and dotenv package to load variable values.

```bash theme={null}
npm install dotenv
```

```bash title=".env" theme={null}
ABV_API_KEY="sk-abv-..."
ABV_BASEURL="https://app.abv.dev" # US region
# ABV_BASEURL="https://eu.app.abv.dev" # EU region
```

```typescript theme={null}
import { ABVClient } from "@abvdev/client";
 
const abv = new ABVClient();
```

**alternatively use Constructor parameters**

```typescript theme={null}
import { ABVClient } from "@abvdev/client";
 
const abv = new ABVClient({
  apiKey: "sk-abv-...",
  baseUrl: "https://app.abv.dev", // US region
  // baseUrl: "https://eu.app.abv.dev", // EU region
});
```

**Explore api**

```typescript theme={null}
import { ABVClient } from "@abvdev/client";
import dotenv from "dotenv";
dotenv.config();

const abv = new ABVClient();

// ...
// fetch a trace
const traceId = "target_trace_id";

async function main() {
  console.log(await abv.api.trace.get(traceId));
}

main();

// explore more endpoints via Intellisense
// abv.api.*
```

# Ingest Traces via the API

It is recommended to use the OpenTelemetry Endpoint to ingest traces. Please refer to the [SDK documentation](/developer/sdks/overview) for more information.

# Alternatives

You can also export data via:

* [UI](/developer/platform/api-data-platform/export-data-from-ui) - Manual batch-exports from the ABV UI
* [Blob Storage](/developer/platform/api-data-platform/export-via-blob-storage) - Scheduled automated exports to cloud storage

# FAQ

<AccordionGroup>
  <Accordion title="Are there any limits to the ABV API?" icon="gauge">
    The API has rate limits based on your plan. Contact [support@abv.dev](mailto:support@abv.dev) for details on rate limits and quotas for your account.
  </Accordion>
</AccordionGroup>
