> 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.

# Upload single-part blob

POST https://{tenant_name}.benchling.com/api/v2/blobs
Content-Type: application/json


This endpoint uploads a blob in a single API call.

Blobs larger than 10MB should be uploaded in [multiple parts](#/Blobs/createMultipartBlob). The data64 parameter is the base64-encoded part contents, and the md5 parameter is the hex-encoded MD5 hash of the part contents. For example, given the string hello, data64 is aGVsbG8= and md5 is 5d41402abc4b2a76b9719d911017c592.


Reference: https://docs.benchling.com/docs/api/v2/benchling-api/blobs/create-blob

## 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 BlobCreate.

- `data64` (string, required) — base64 encoded file contents
- `md5` (string, required) — The MD5 hash of the blob part. Note: this should be the hash of the raw data of the blob part, not the hash of the base64 encoding.
- `name` (string, required) — Name of the blob
- `type` (enum, required) — One of RAW_FILE or VISUALIZATION. If VISUALIZATION, the blob may be displayed as an image preview.
  - Allowed values: `RAW_FILE`, `VISUALIZATION`
- `mimeType` (string, optional, default: application/octet-stream) — eg. application/jpeg

## Response

### 200

Created

- `id` (string, optional) — The universally unique identifier (UUID) for the blob.
- `mimeType` (string, optional) — eg. application/jpeg
- `name` (string, optional) — Name of the blob
- `type` (enum, optional) — One of RAW_FILE or VISUALIZATION. If VISUALIZATION, the blob may be displayed as an image preview.
  - Allowed values: `RAW_FILE`, `VISUALIZATION`
- `uploadStatus` (enum, optional)
  - Allowed values: `IN_PROGRESS`, `COMPLETE`, `ABORTED`

## 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

### A file containing the string "hello"

**Request**

```json
{
  "data64": "aGVsbG8=",
  "md5": "5d41402abc4b2a76b9719d911017c592",
  "name": "hello.txt",
  "type": "RAW_FILE",
  "mimeType": "text/plain"
}
```

**Response**

```json
{
  "id": "c33fe52d-fe6a-4c98-adcd-211bdf6778f7",
  "mimeType": "text/csv",
  "name": "MyInstrumentInputFile.csv",
  "type": "RAW_FILE",
  "uploadStatus": "IN_PROGRESS"
}
```

**SDK Code**

```python A file containing the string "hello"
import requests

url = "https://{tenant_name}.benchling.com/api/v2/blobs"

payload = {
    "data64": "aGVsbG8=",
    "md5": "5d41402abc4b2a76b9719d911017c592",
    "name": "hello.txt",
    "type": "RAW_FILE",
    "mimeType": "text/plain"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript A file containing the string "hello"
const url = 'https://{tenant_name}.benchling.com/api/v2/blobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data64":"aGVsbG8=","md5":"5d41402abc4b2a76b9719d911017c592","name":"hello.txt","type":"RAW_FILE","mimeType":"text/plain"}'
};

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

### A .png image

**Request**

```json
{
  "data64": "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAUBAMAAABohZD3AAAAG1BMVEUAAAD////f39+/v78fHx9/f39fX1+fn58/Pz+3dh1rAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAT0lEQVQYlWNgoDlQBhGF7AIwvjOIYGJQwMkPSigsAPLZhRrAfCe3sgAzID+dDaLEmcNUUBTIL2NQgfLNAkD6k1wg8oqFooUahepCMP00BQC95QvY1zDquQAAAABJRU5ErkJggg==",
  "md5": "50170053b55179167f1c21350c869bb7",
  "name": "hello.png",
  "type": "VISUALIZATION",
  "mimeType": "image/png"
}
```

**Response**

```json
{
  "id": "c33fe52d-fe6a-4c98-adcd-211bdf6778f7",
  "mimeType": "text/csv",
  "name": "MyInstrumentInputFile.csv",
  "type": "RAW_FILE",
  "uploadStatus": "IN_PROGRESS"
}
```

**SDK Code**

```python A .png image
import requests

url = "https://{tenant_name}.benchling.com/api/v2/blobs"

payload = {
    "data64": "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAUBAMAAABohZD3AAAAG1BMVEUAAAD////f39+/v78fHx9/f39fX1+fn58/Pz+3dh1rAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAT0lEQVQYlWNgoDlQBhGF7AIwvjOIYGJQwMkPSigsAPLZhRrAfCe3sgAzID+dDaLEmcNUUBTIL2NQgfLNAkD6k1wg8oqFooUahepCMP00BQC95QvY1zDquQAAAABJRU5ErkJggg==",
    "md5": "50170053b55179167f1c21350c869bb7",
    "name": "hello.png",
    "type": "VISUALIZATION",
    "mimeType": "image/png"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript A .png image
const url = 'https://{tenant_name}.benchling.com/api/v2/blobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data64":"iVBORw0KGgoAAAANSUhEUgAAAB4AAAAUBAMAAABohZD3AAAAG1BMVEUAAAD////f39+/v78fHx9/f39fX1+fn58/Pz+3dh1rAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAT0lEQVQYlWNgoDlQBhGF7AIwvjOIYGJQwMkPSigsAPLZhRrAfCe3sgAzID+dDaLEmcNUUBTIL2NQgfLNAkD6k1wg8oqFooUahepCMP00BQC95QvY1zDquQAAAABJRU5ErkJggg==","md5":"50170053b55179167f1c21350c869bb7","name":"hello.png","type":"VISUALIZATION","mimeType":"image/png"}'
};

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