> For the complete documentation index, see [llms.txt](https://docs.pending.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pending.ai/api-reference/pai-retro/building-block-libraries.md).

# Building Block Libraries

Explore the various libraries available for retrosynthesis

For planning valid multi-step synthetic routes, various *building block libraries* are used to facilitate terminating different reaction subtrees. Our **Retrosynthesis** platform allows users to specify specific libraries for synthetic planning although it is recommended to select all libraries to improve the overall success rate. When submitting a query molecule for assessing synthetic accessibility, a list of libraries must be specified using respective `id` fields. **Considerations**

* Library selection can influence the success of the retrosynthesis process. It's important to choose libraries that are well-suited for the specific synthetic routes. - Some libraries may have limitations in terms of the reactions they can support or the average cost of available molecules. Use the latest libraries for optimal results (refer to the `available_from` field). See [here](https://docs.pending.ai/capabilities/synthetic-accessibility) for more information on our **Retrosynthesis** capability.

## List Libraries

> Retrieve a list of Library resources using offset-based pagination.\
> See the returned \`data\` field for more information about the Library\
> resources. Use additional \`metadata\` and \`links\` fields to navigate\
> the paginated resources.

```json
{"openapi":"3.1.0","info":{"title":"Pending AI Retrosynthesis API","version":"0.0.0"},"tags":[{"name":"Libraries","description":"For planning valid multi-step synthetic routes, various *building block libraries* are used to facilitate terminating different reaction subtrees. Our **Retrosynthesis**  platform allows users to specify specific libraries for synthetic planning although it is recommended to select all libraries to improve the overall success rate. When  submitting a query molecule for assessing synthetic accessibility, a list of libraries  must be specified using respective `id` fields.\n**Considerations**\n- Library selection can influence the success of the retrosynthesis process. It's important to choose libraries that are well-suited for the specific synthetic routes. - Some libraries may have limitations in terms of the reactions they can support or the average cost of available molecules. Use the latest libraries for optimal results (refer to the `available_from` field).\nSee [here](https://docs.pending.ai/capabilities/synthetic-accessibility) for more information on our **Retrosynthesis** capability."}],"servers":[{"url":"https://api.pending.ai/retro/v2","description":"Pending AI API Server"}],"security":[{"oauth":[]},{"token":[]}],"components":{"securitySchemes":{"oauth":{"type":"oauth2","description":"Pending AI OAuth2 authentication.","flows":{"authorizationCode":{"refreshUrl":"https://auth.pending.ai/oauth/token","scopes":{"openid":"Required for OpenID Connect sign-in","profile":"Access to the user's basic profile information","email":"Access to the user's email address","offline_access":"Request a refresh token"},"authorizationUrl":"https://auth.pending.ai/authorize","tokenUrl":"https://auth.pending.ai/oauth/token"}}},"token":{"type":"http","description":"Pending AI authentication access token.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RequestValidationErrorContent":{"description":"A request or response encountered a validation error when enforcing field constraints. Refer to `error.details` to resolve individual errors. For any unexpected validation errors, contact Pending AI support via email at [support@pending.ai](mailto:support@pending.ai).","properties":{"status":{"default":"error","description":"Status of the request.","enum":["error","success"],"title":"Request Status","type":"string"},"status_code":{"description":"Response status code received for the request.","title":"Status Code","type":"integer"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A unique ID given to each request.","title":"Request ID"},"error":{"anyOf":[{"$ref":"#/components/schemas/RequestValidationErrorInfo"},{"type":"null"}],"default":null,"description":"Response content containing extra information for an error.","title":"Error Information"}},"required":["status_code"],"title":"Request Validation Error","type":"object"},"RequestValidationErrorInfo":{"description":"Response content containing extra information for an error.","properties":{"code":{"description":"Short identifier code to classify the error.","title":"Code","type":"string"},"timestamp":{"description":"Timestamp of when the error occurred.","format":"date-time","title":"Timestamp","type":"string"},"path":{"description":"Request path for where the error occurred.","title":"Request Path","type":"string"},"message":{"default":null,"description":"Message associated with the encountered error.","title":"Message"},"details":{"anyOf":[{"items":{"$ref":"#/components/schemas/RequestValidationErrorInfoDetails"},"type":"array"},{"type":"null"}],"default":null,"description":"Validation errors with extra information.","title":"Detailed Message"}},"required":["code","path"],"title":"Error Information","type":"object"},"RequestValidationErrorInfoDetails":{"description":"An individual validation error with extra information.","properties":{"location":{"default":null,"description":"One or more parameters for where the validation failed.","title":"Validation Location"},"error_type":{"default":null,"description":"A description of the validation constraint that was broken.","title":"Constraint Type"}},"title":"Detailed Error Content","type":"object"}}},"paths":{"/libraries":{"get":{"tags":["Libraries"],"summary":"List Libraries","description":"Retrieve a list of Library resources using offset-based pagination.\nSee the returned `data` field for more information about the Library\nresources. Use additional `metadata` and `links` fields to navigate\nthe paginated resources.","operationId":"retrieve_library_list_libraries_get","parameters":[{"description":"The page number to retrieve.","required":false,"schema":{"type":"integer"},"name":"page","in":"query"},{"description":"The maximum number of items to return per page.","required":false,"schema":{"type":"integer"},"name":"limit","in":"query"}],"responses":{"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"null","title":"Return"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestValidationErrorContent"}}}}}}}}}
```
