> For the complete documentation index, see [llms.txt](https://docs.merchone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.merchone.com/api-reference/api-v1/library.md).

# Library

## Introduction

Through the endpoints included in the **Library** section, you will be able to:

* Retrieve all the available images from the library
* Retrieve an image from the library
* Add an image to the library

## Endpoints

## Show library

> This API endpoint retrieves a list of all images from your library

```json
{"openapi":"3.0.3","info":{"title":"MerchOne API","version":"1.0.0"},"servers":[{"url":"https://api.merchone.com/api/v1"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/library":{"get":{"tags":["Library"],"summary":"Show library","description":"This API endpoint retrieves a list of all images from your library","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"image_id":{"type":"string"},"file_name":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"size":{"type":"string"},"image_url":{"type":"string"}}}}}}}}},"401":{"description":"Unauthorized"}}}}}}
```

## Show an image from the library

> This API endpoint retrieves an images from your library

```json
{"openapi":"3.0.3","info":{"title":"MerchOne API","version":"1.0.0"},"servers":[{"url":"https://api.merchone.com/api/v1"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/library/{image}":{"get":{"tags":["Library"],"summary":"Show an image from the library","description":"This API endpoint retrieves an images from your library","parameters":[{"name":"image","description":"The ID of the image.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"image_id":{"type":"string"},"file_name":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"size":{"type":"string"},"image_url":{"type":"string"}}}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not found."}}}}}}
```

## Post a new image to the library

> This API endpoint allows you to upload a new image to your library

```json
{"openapi":"3.0.3","info":{"title":"MerchOne API","version":"1.0.0"},"servers":[{"url":"https://api.merchone.com/api/v1"}],"security":[{"BasicAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic"}}},"paths":{"/library":{"post":{"tags":["Library"],"summary":"Post a new image to the library","description":"This API endpoint allows you to upload a new image to your library","parameters":[{"name":"Accept","in":"header","description":"Media type(s) that is/are acceptable for the response","required":true,"schema":{"type":"string","default":"application/json","enum":["application/json"]}}],"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string"},"url":{"type":"string"}},"required":["file_name","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"image_id":{"type":"string"},"file_name":{"type":"string"},"upload_date":{"type":"string"}}}}}}}},"401":{"description":"Unauthorized"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.merchone.com/api-reference/api-v1/library.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.
