# Generative Models

Capturing the complexity of novel chemical spaces requires advanced AI solutions to assist in generating diverse yet relevant molecular structures. Pending AI makes available a suite of pre-trained generative models, each designed with specific capabilities to address various drug discovery challenges.

Models can be fine-tuned to adapt to unique chemical subspaces, enhancing iteration speed for Hit Identification in early Drug Discovery. Contact us to learn more about custom model training and fine-tuning.

See [here](https://docs.pending.ai/capabilities/generative-ai) for more information on our **Generative AI** capability.

## List models

> Retrieve a list of models. Key-based pagination is supported. See query parameters for more details on how to retrieve the next or previous page of results.

```json
{"openapi":"3.1.0","info":{"title":"PAI Generator","version":"v1"},"tags":[{"description":"\nCapturing the complexity of novel chemical spaces requires advanced AI solutions to\nassist in generating diverse yet relevant molecular structures. Pending AI makes\navailable a suite of pre-trained generative models, each designed with specific\ncapabilities to address various drug discovery challenges.\n\nModels can be fine-tuned to adapt to unique chemical subspaces, enhancing iteration\nspeed for Hit Identification in early Drug Discovery. Contact us to learn more about\ncustom model training and fine-tuning.\n\nSee [here](https://docs.pending.ai/capabilities/generative-ai)  for more information on\nour **Generative AI** capability.\n","name":"Models"}],"servers":[{"description":"Pending AI Server","url":"https://api.pending.ai/generator/v1"}],"security":[{"oauth":[""],"token":[""]}],"components":{"securitySchemes":{"oauth":{"description":"OAuth2 authentication.\n\nAuthenticate using the Pending AI [authorization server](https://auth.pending.ai/authorize) through an implicit OAuth2 flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.","flows":{"implicit":{"authorizationUrl":"https://auth.pending.ai/authorize","scopes":{}}},"type":"oauth2"}},"schemas":{"ResourceList_ModelResource_":{"properties":{"data":{"description":"A list containing the retrieved objects. The list can contain fewer\nobjects than requested if a smaller number of results were found.","items":{"$ref":"#/components/schemas/ModelResource"},"title":"Data","type":"array"},"has_more":{"description":"A boolean flag that indicates whether there are more items available\nto be fetched on subsequent pages. Used for pagination control.","title":"Has More","type":"boolean"},"object":{"default":"list","description":"The type of resource.","pattern":"^\\w+$","title":"Resource Object","type":"string"}},"required":["data","has_more"],"title":"ResourceList[ModelResource]","type":"object"},"ModelResource":{"description":"A model resource represents a machine learning model that can be\nused for generating samples of molecular structures in batches of\nSMILES strings. Each model leverages a specific architecture and set\nof parameters to produce novel and diverse molecules.","properties":{"description":{"anyOf":[{"pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$","type":"string"},{"type":"null"}],"description":"Optional description for the model.","title":"Description"},"id":{"description":"The unique resource identifier.","pattern":"^\\w+$","title":"Resource Id","type":"string"},"metadata":{"additionalProperties":true,"description":"Optional metadata for the model. Can include fields such as the\nnumber of parameters, training dataset, training time, and other\nrelevant information.","title":"Metadata","type":"object"},"name":{"anyOf":[{"pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$","type":"string"},{"type":"null"}],"description":"Optional name for the model.","title":"Name"},"object":{"description":"The type of resource.","pattern":"^\\w+$","title":"Resource Object","type":"string"},"summary":{"additionalProperties":true,"description":"Optional summary statistics for the model. Can include fields\nsuch as accuracy, loss, and other relevant metrics to summarise the\noverall performance of the model.","title":"Summary","type":"object"},"version":{"anyOf":[{"pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$","type":"string"},{"type":"null"}],"description":"Optional version for the model.","title":"Version"}},"required":["id","object"],"title":"Model","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"ResponseValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"ResponseValidationError","type":"object"}}},"paths":{"/models":{"get":{"description":"Retrieve a list of models. Key-based pagination is supported. See query parameters for more details on how to retrieve the next or previous page of results.","operationId":"list_models_models_get","parameters":[{"description":"Limit the number of resources returned within the `data` field of the paged response. The field may contain fewer items than the specified limit when there are not enough items to return.","in":"query","name":"limit","required":false,"schema":{"default":5,"description":"Limit the number of resources returned within the `data` field of the paged response. The field may contain fewer items than the specified limit when there are not enough items to return.","maximum":100,"minimum":1,"title":"Limit","type":"integer"}},{"description":"A key used to navigate pagination results. The given value must match an `id` for the specific resource `object` type. If provided, the paged response will contain resources from the next 'page', or those that were submitted before the matched resource (reverse chronological order).","in":"query","name":"next-page","required":false,"schema":{"anyOf":[{"maxLength":255,"minLength":1,"pattern":"^\\w+$","type":"string"},{"type":"null"}],"description":"A key used to navigate pagination results. The given value must match an `id` for the specific resource `object` type. If provided, the paged response will contain resources from the next 'page', or those that were submitted before the matched resource (reverse chronological order).","title":"Next-Page"}},{"description":"A key used to navigate pagination results. The given value must match an `id` for the specific resource `object` type. If provided, the paged response will contain resources from the previous 'page', or those that were submitted after the matched resource (reverse chronological order).","in":"query","name":"prev-page","required":false,"schema":{"anyOf":[{"maxLength":255,"minLength":1,"pattern":"^\\w+$","type":"string"},{"type":"null"}],"description":"A key used to navigate pagination results. The given value must match an `id` for the specific resource `object` type. If provided, the paged response will contain resources from the previous 'page', or those that were submitted after the matched resource (reverse chronological order).","title":"Prev-Page"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceList_ModelResource_"}}},"description":"Returns a list of models."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationError"}}},"description":"Response Validation Error"}},"summary":"List models","tags":["Models"]}}}}
```

## Retrieve a model

> Retrieves a model and a detailed overview of its different features. Model information can optionally include metadata and summary statistics with other identifiable fields.

```json
{"openapi":"3.1.0","info":{"title":"PAI Generator","version":"v1"},"tags":[{"description":"\nCapturing the complexity of novel chemical spaces requires advanced AI solutions to\nassist in generating diverse yet relevant molecular structures. Pending AI makes\navailable a suite of pre-trained generative models, each designed with specific\ncapabilities to address various drug discovery challenges.\n\nModels can be fine-tuned to adapt to unique chemical subspaces, enhancing iteration\nspeed for Hit Identification in early Drug Discovery. Contact us to learn more about\ncustom model training and fine-tuning.\n\nSee [here](https://docs.pending.ai/capabilities/generative-ai)  for more information on\nour **Generative AI** capability.\n","name":"Models"}],"servers":[{"description":"Pending AI Server","url":"https://api.pending.ai/generator/v1"}],"security":[{"oauth":[""],"token":[""]}],"components":{"securitySchemes":{"oauth":{"description":"OAuth2 authentication.\n\nAuthenticate using the Pending AI [authorization server](https://auth.pending.ai/authorize) through an implicit OAuth2 flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.","flows":{"implicit":{"authorizationUrl":"https://auth.pending.ai/authorize","scopes":{}}},"type":"oauth2"}},"schemas":{"ModelResource":{"description":"A model resource represents a machine learning model that can be\nused for generating samples of molecular structures in batches of\nSMILES strings. Each model leverages a specific architecture and set\nof parameters to produce novel and diverse molecules.","properties":{"description":{"anyOf":[{"pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$","type":"string"},{"type":"null"}],"description":"Optional description for the model.","title":"Description"},"id":{"description":"The unique resource identifier.","pattern":"^\\w+$","title":"Resource Id","type":"string"},"metadata":{"additionalProperties":true,"description":"Optional metadata for the model. Can include fields such as the\nnumber of parameters, training dataset, training time, and other\nrelevant information.","title":"Metadata","type":"object"},"name":{"anyOf":[{"pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$","type":"string"},{"type":"null"}],"description":"Optional name for the model.","title":"Name"},"object":{"description":"The type of resource.","pattern":"^\\w+$","title":"Resource Object","type":"string"},"summary":{"additionalProperties":true,"description":"Optional summary statistics for the model. Can include fields\nsuch as accuracy, loss, and other relevant metrics to summarise the\noverall performance of the model.","title":"Summary","type":"object"},"version":{"anyOf":[{"pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$","type":"string"},{"type":"null"}],"description":"Optional version for the model.","title":"Version"}},"required":["id","object"],"title":"Model","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"ResponseValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"ResponseValidationError","type":"object"}}},"paths":{"/models/{model_id}":{"get":{"description":"Retrieves a model and a detailed overview of its different features. Model information can optionally include metadata and summary statistics with other identifiable fields.","operationId":"retrieve_model_models__model_id__get","parameters":[{"description":"A unique identifier for a model resource.","in":"path","name":"model_id","required":true,"schema":{"description":"A unique identifier for a model resource.","maxLength":255,"minLength":1,"pattern":"^\\w+$","title":"Model Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResource"}}},"description":"Returns the model."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResource"}}},"description":"Model resource not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationError"}}},"description":"Response Validation Error"}},"summary":"Retrieve a model","tags":["Models"]}}}}
```

## Retrieve a model status

> Retrieve the status of a model. Sampling is made available by the Pending AI platform and may be affected by heavy traffic or resource constraints. Check the status of a model before sampling to ensure it is available.

```json
{"openapi":"3.1.0","info":{"title":"PAI Generator","version":"v1"},"tags":[{"description":"\nCapturing the complexity of novel chemical spaces requires advanced AI solutions to\nassist in generating diverse yet relevant molecular structures. Pending AI makes\navailable a suite of pre-trained generative models, each designed with specific\ncapabilities to address various drug discovery challenges.\n\nModels can be fine-tuned to adapt to unique chemical subspaces, enhancing iteration\nspeed for Hit Identification in early Drug Discovery. Contact us to learn more about\ncustom model training and fine-tuning.\n\nSee [here](https://docs.pending.ai/capabilities/generative-ai)  for more information on\nour **Generative AI** capability.\n","name":"Models"}],"servers":[{"description":"Pending AI Server","url":"https://api.pending.ai/generator/v1"}],"security":[{"oauth":[""],"token":[""]}],"components":{"securitySchemes":{"oauth":{"description":"OAuth2 authentication.\n\nAuthenticate using the Pending AI [authorization server](https://auth.pending.ai/authorize) through an implicit OAuth2 flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.","flows":{"implicit":{"authorizationUrl":"https://auth.pending.ai/authorize","scopes":{}}},"type":"oauth2"}},"schemas":{"RetrieveStatusOutput":{"description":"Output model for retrieving the status of a model.","properties":{"status":{"description":"The status of the model. Requesting samples from the model\ndepends on the model being `online`. Generating structures can\nalso `timeout` or be unavailable if the model is `offline`.","enum":["online","offline","timeout","error"],"title":"Status","type":"string"}},"required":["status"],"title":"ModelRetrieveStatusOutput","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"ResponseValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"ResponseValidationError","type":"object"}}},"paths":{"/models/{model_id}/status":{"get":{"description":"Retrieve the status of a model. Sampling is made available by the Pending AI platform and may be affected by heavy traffic or resource constraints. Check the status of a model before sampling to ensure it is available.","operationId":"retrieve_model_status_models__model_id__status_get","parameters":[{"description":"A unique identifier for a model resource.","in":"path","name":"model_id","required":true,"schema":{"description":"A unique identifier for a model resource.","maxLength":255,"minLength":1,"pattern":"^\\w+$","title":"Model Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveStatusOutput"}}},"description":"Returns the model status."},"404":{"content":{"application/json":{"schema":{"title":"Return","type":"null"}}},"description":"Model resource not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationError"}}},"description":"Response Validation Error"}},"summary":"Retrieve a model status","tags":["Models"]}}}}
```


---

# Agent Instructions: 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.pending.ai/api-reference/pai-generator/generative-models.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.
