> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Convert a blob or file containing instrument data to ASM (Allotrope Simple Model) JSON

POST https://{tenant_name}.benchling.com/api/v2/connect/convert-to-asm
Content-Type: application/json

Converts an input blob or file containing instrument data to ASM (Allotrope Simple Model) JSON.

May provide the name of the instrument vendor (see /connect/list-allotropy-vendors) or the ID of a
connection associated with an instrument vendor.


Reference: https://docs.benchling.com/docs/api/v2/benchling-api/connect/convert-to-asm

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a ConvertToASM.

- `blobOrFileId` (string, required) — The ID of a blob link or the API ID of a file to process.
- `connectionId` (string, optional) — The ID of a connection to read the instrument vendor from.
- `vendor` (string, optional) — The instrument vendor to use for conversion. See /connect/list-allotropy-vendors.

## Response

### 200

Blob ID of a blob containing the converted ASM

- `blobId` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### BadRequestErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)

## Examples

**Request**

```json
{
  "blobOrFileId": "string"
}
```

**Response**

```json
{
  "blobId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/connect/convert-to-asm"

payload = { "blobOrFileId": "string" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/connect/convert-to-asm';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"blobOrFileId":"string"}'
};

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