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

# Dolva API Reference: Base URL, Auth, and Endpoints

> Learn how to authenticate, format requests, and handle responses for the Dolva REST API. Covers all endpoints, error codes, and validation errors.

The Dolva API is a REST API that accepts audio file uploads and returns JSON analysis results. All endpoints are available at `https://api.dolva.ai`.

## Base URL

```text theme={null}
https://api.dolva.ai
```

## API Version

The current API version is `v1`. All analysis endpoints are prefixed with `/v1/`.

## Authentication

All analysis endpoints require a Bearer token in the `Authorization` header:

```text theme={null}
Authorization: Bearer dv-xxxxxxxx
```

The `GET /health` endpoint does not require authentication.

See [Authentication](/authentication) for full details on obtaining and using your token.

## Request Format

Analysis endpoints accept `multipart/form-data` requests. Include your audio file in the `audio` field:

| Field   | Type          | Required | Description               |
| ------- | ------------- | -------- | ------------------------- |
| `audio` | binary (file) | Yes      | The audio file to analyze |

## Response Format

All endpoints return `application/json`. Successful responses have HTTP status `200`.

## Endpoints

<CardGroup cols={2}>
  <Card title="POST /v1/analyze/cognitive" icon="brain" href="/api-reference/analyze-cognitive">
    Analyze cognitive signals from an audio file.
  </Card>

  <Card title="POST /v1/analyze/emotion" icon="face-smile" href="/api-reference/analyze-emotion">
    Analyze emotional signals from an audio file.
  </Card>

  <Card title="GET /health" icon="heart-pulse" href="/api-reference/health">
    Check API availability.
  </Card>
</CardGroup>

## Error Responses

| Status                      | Description                                   |
| --------------------------- | --------------------------------------------- |
| `401 Unauthorized`          | Missing or invalid Bearer token               |
| `403 Forbidden`             | Token valid but lacks permissions             |
| `422 Unprocessable Entity`  | Validation error — see error body for details |
| `500 Internal Server Error` | Server-side error — retry with backoff        |

### Validation Error Body

When a `422` is returned, the response body contains a structured error object:

```json theme={null}
{
  "detail": [
    {
      "loc": ["body", "audio"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}
```

See [Error Handling](/guides/error-handling) for guidance on handling these errors in your code.
