> For the complete documentation index, see [llms.txt](/llms.txt).

# `block_put`

## `/api/v0/block/put`[​](#apiv0blockput "Direct link to apiv0blockput")

Store input as an IPFS block.

### Request[​](#request "Direct link to Request")

- Syntax
- Example

```
curl "https://ipfs.infura.io:5001/api/v0/block/put?format=v0&mhtype=sha2-256&mhlen=-1" \
  -X POST \
  -u "<YOUR-API-KEY>:<YOUR-API-KEY-SECRET>" \
  -H "Content-Type: multipart/form-data" \
  -F file=@"<file>"

```

```
curl "https://ipfs.infura.io:5001/api/v0/block/put" \
  -X POST \
  -u "<YOUR-API-KEY>:<YOUR-API-KEY-SECRET>" \
  -H "Content-Type: multipart/form-data" \
  -F file=@"/purpink.jpeg"

```

#### Request parameters[​](#request-parameters "Direct link to Request parameters")

- `file` _[Required]_ - The path to a file to be added to IPFS.
- `format` _[Optional]_ - Content ID format for blocks to be created with. The default is `v0`.
- `mhtype` _[Optional]_ - Multihash hash function. The default is `sha2-256`.
- `mhlen` _[Optional]_ - Multihash hash length. The default is `-1`.

### Response[​](#response "Direct link to Response")

On success, the call to this endpoint will return with 200 and the following body:

#### Body[​](#body "Direct link to Body")

```
{
  "Key": "QmaYL7E4gDTPNfLxrCEEEcNJgcHBJ55NxxTnxpDKWqMtJ3",
  "Size": 2392
}

```

#### Result fields[​](#result-fields "Direct link to Result fields")

- `Key` - Key of the block.
- `Size` - Integer indication size in bytes.
