# /raw-extract

## Creates a Raw Extraction Job

<mark style="color:green;">`POST`</mark> `https://waveline.ai/api/v1/raw-extract`

Creates a new job that converts documents into plain text.&#x20;

#### Headers

| Name                                            | Type   | Description                   |
| ----------------------------------------------- | ------ | ----------------------------- |
| Content-Type                                    | String | Should be `application/json`. |
| Authorization<mark style="color:red;">\*</mark> | String | `Bearer <YOUR_API_KEY>`       |

#### Request Body

| Name                                         | Type   | Description                                                           |
| -------------------------------------------- | ------ | --------------------------------------------------------------------- |
| contentUrl<mark style="color:red;">\*</mark> | String | A URL pointing to your data. (e.g. <https://example.com/invoice.pdf>) |

{% tabs %}
{% tab title="200: OK The job has been successfully created." %}

```typescript
{
    "id": string,
    "createdAt": string,
    "status": "CREATED",
    "type": "raw-extract",
    "message": string,
    "pages": number, // Number of billed pages in this job
    "fileName": string,
    "result": null, // Is null after creation
    "urls": {
        "get": string; // Query this URL to get the status/result of your job
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Missing body, wrong structure, ..." %}

```typescript
{
    "error": string
}
```

{% endtab %}

{% tab title="401: Unauthorized Provided API key is not valid." %}

```typescript
{
    "error": string
}
```

{% endtab %}

{% tab title="500: Internal Server Error An internal server error on our side happened. Please report to <team@waveline.ai> if this happens." %}

```typescript
{
    "error": string
}
```

{% endtab %}

{% tab title="402: Payment Required Your account is missing a billing method." %}

```typescript
{
    "error": string
}
```

{% endtab %}
{% endtabs %}

&#x20;:warning:To use this endpoint, book a [meeting](https://calendly.com/waveline/30min-landing) to discuss how you would like the result formatted:warning:

With this endpoint, you can extract everything from PDFs: Text, Titles, Tables, Images etc. To give you a better intuition have a look at our [Example](/extract/examples/raw-extraction.md).&#x20;

```bash
curl -X POST "https://waveline.ai/api/v1/raw-extract" \
     -H "Content-Type: application/pdf" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -d '{
          "fileName": "pointe_8-8.pdf",
          "contentType": "application/pdf",
          "contentUrl": "https://vwxzjwxlflvltwsntpsb.supabase.co/storage/v1/object/public/documentation/pointe_8-8.pdf",
        }'
```

If you already have an account, you can [get an API key here](https://waveline.ai/extract/dashboard/api-keys).&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waveline.ai/extract/endpoints/raw-extract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
