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

# API-referentie

> Volledige referentie voor de VoiceCheap REST API

# API-referentie

De VoiceCheap API is georganiseerd rond REST-principes. Het gebruikt standaard HTTP-methoden, retourneert JSON-gecodeerde antwoorden en gebruikt standaard HTTP-antwoordcodes.

## Basis-URL

Alle API-verzoeken moeten worden gedaan aan:

```
https://api.voicecheap.ai
```

## Authenticatie

Alle verzoeken vereisen een API-sleutel die wordt doorgegeven in de `x-api-key`-header. Zie de [Authenticatie](/docs/nl/authentication)-pagina voor details.

## Inhoudstypen

* **Verzoek**: Gebruik `multipart/form-data` voor bestandsuploads, `application/json` voor andere verzoeken
* **Antwoord**: JSON-eindpunten retourneren `application/json`. Transcript-exports kunnen ook SRT- of VTT-tekst retourneren.

## Beschikbare eindpunten

<CardGroup cols={2}>
  <Card title="Media transcriberen" icon="captions" href="/docs/nl/api-reference/transcribe">
    `POST /v1/transcribe`

    Transcribeer een geüpload bestand als JSON, SRT of VTT.
  </Card>

  <Card title="Projecttranscript exporteren" icon="file-lines" href="/docs/nl/api-reference/project-transcript">
    `POST /v1/projects/{projectId}/transcript`

    Haal originele of vertaalde projecttranscripts op.
  </Card>

  <Card title="Vertaling starten" icon="play" href="/docs/nl/api-reference/translate">
    `POST /v1/translate`

    Upload een video- of audiobestand en start een vertaalproject.
  </Card>

  <Card title="Vertaalstatus ophalen" icon="magnifying-glass" href="/docs/nl/api-reference/translation-status">
    `GET /v1/translate/{projectId}/status`

    Controleer de status van een vertaalproject en haal resultaten op.
  </Card>

  <Card title="Projectdetails ophalen" icon="list-tree" href="/docs/nl/api-reference/project-details">
    `GET /v1/projects/{projectId}`

    Haal de vertaalde versiegeschiedenis, lipsynchronisatie-geschiedenis en projectstatus op.
  </Card>

  <Card title="Project verwijderen" icon="trash" href="/docs/nl/api-reference/delete-project">
    `DELETE /v1/translate/{projectId}`

    Verwijder een vertaalproject en de bijbehorende assets permanent.
  </Card>
</CardGroup>

## Vertaalworkflow

De typische workflow voor het vertalen van een video is:

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant API
    participant Processing

    Client->>API: POST /v1/translate (file + options)
    API->>Processing: Queue translation job
    API-->>Client: 200 OK (projectId)

    loop Poll for status
        Client->>API: GET /v1/translate/{projectId}/status
        API-->>Client: Status (processing/success/failed)
    end

    Note over Client: Download translated video URL when status is "success"
```

## Antwoordformaat

Alle succesvolle antwoorden volgen deze algemene structuur:

```json theme={null}
{
  "success": true,
  "message": "Description of the result"
  // Additional fields specific to the endpoint
}
```

Foutmeldingen volgen deze structuur:

```json theme={null}
{
  "code": "ERROR_CODE",
  "message": "Human-readable error description"
}
```

## HTTP-statuscodes

| Statuscode | Beschrijving                                        |
| ---------- | --------------------------------------------------- |
| 200        | Succes                                              |
| 400        | Bad Request - Ongeldige parameters                  |
| 401        | Unauthorized - Ongeldige of ontbrekende API-sleutel |
| 403        | Forbidden - Onvoldoende rechten of credits          |
| 404        | Not Found - Bron bestaat niet                       |
| 429        | Too Many Requests - Snelheidslimiet overschreden    |
| 500        | Internal Server Error                               |
