# Estimate a merge

Source: https://deeperesearch.com/docs/api/reference/operations/estimatemerge/

POST

/v1/research/{id}/merge/estimate

```js
const url = 'https://deeperesearch.com/v1/research/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge/estimate';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"mode":"comparison"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://deeperesearch.com/v1/research/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "mode": "comparison" }'
```

What merging this research’s finished reports would cost, and which reports would be included. Free.

## Authorizations

- **[apiKey](https://deeperesearch.com/docs/api/reference/#apikey)**

## Parameters

### Path Parameters

**id**

required

string format: uuid

## Request Bodyrequired

application/json

object

**model**

A synthesis model id from GET /v1/merge/models. Defaults to the default model.

string

\>= 1 characters <= 120 characters

**thinking**

Reasoning depth. Defaults to the model’s default.

string

Allowed values: off low medium high

**mode**

Comprehensive (default), executive or comparison.

string

Allowed values: comprehensive executive comparison

**instructions**

What the synthesis should focus on. Up to 1,000 characters.

string

<= 1000 characters

**report_ids**

Only merge these provider reports. Defaults to every finished mergeable report.

Array\<string>

\>= 1 items <= 16 items

### Example

```json
{
  "mode": "comparison"
}
```

## Responses

### 200

The estimate

application/json

object

**model**

required

string

**thinking**

required

string

Allowed values: off low medium high

**mode**

required

string

Allowed values: comprehensive executive comparison

**estimated_input_tokens**

required

integer

\>= -9007199254740991 <= 9007199254740991

**low_usd**

required

US dollars

number

**expected_usd**

required

US dollars

number

**high_usd**

required

US dollars

number

**hold_usd**

required

Worst case, held from credit while it runs

number

**source_reports**

required

Array\<object>

object

**id**

required

string format: uuid

**vendor**

required

string | null

**offering**

required

string | null

**excluded_reports**

required

Array\<object>

A report left out of a merge, and why.

object

**report_id**

required

Any of:

- string

  string format: uuid

- null

  null

**vendor**

required

string

**offering**

required

string

**reason**

required

string

#### Example

```json
{
  "thinking": "off",
  "mode": "comprehensive"
}
```

### 400

The body isn’t valid JSON (invalid_json)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 401

Missing or invalid API key (unauthorized)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 403

The key lacks the scope this needs (forbidden)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 404

Not found in this organization (not_found)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 413

The body is over 128 KB (body_too_large)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 422

Invalid request; the message names the field (invalid_request, exceeds_max_cost, vendor_unavailable, …)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 429

Rate limit, spending limit or quota reached (rate_limited, limit_reached, quota_exceeded). See Retry-After.

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```

### 503

The feature isn’t available on this server (merge_unavailable)

application/json

object

**error**

required

object

**code**

required

Stable, machine-readable error code. See Errors in the docs.

string

**message**

required

What went wrong, written for people

string

#### Example generated

```json
{
  "error": {
    "code": "example",
    "message": "example"
  }
}
```
