> 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-generator/generative-models.md).

# Generative Models

Explore SoTA Deep-Learning models for exploring novel chemical space

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.

## 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":"v0.0.104"},"tags":[{"name":"Models","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"}],"servers":[{"url":"https://api.pending.ai/generator/v1","description":"Pending AI API Server"}],"security":[{"oauth":[""]},{"token":[""]}],"components":{"securitySchemes":{"oauth":{"type":"oauth2","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":{"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","generator_api.models:create":"Create PAI Generator models","generator_api.models:read":"Read PAI Generator models","generator_api.models:update":"Update PAI Generator models","generator_api.models:delete":"Delete PAI Generator models","generator_api.samples:create":"Create PAI Generator samples","generator_api.samples:read":"Read PAI Generator samples","generator_api.samples:update":"Update PAI Generator samples","generator_api.samples:delete":"Delete PAI Generator samples"},"authorizationUrl":"https://auth.pending.ai/authorize"}}},"token":{"type":"http","description":"Bearer token authentication.\n\nProvide a valid Pending AI authentication token. Generating tokens can be done manually through the Pending AI CLI. Ensure you have an existing account or [register now](https://lab.pending.ai/).\n\n```bash\npendingai auth login\npendingai auth token\n```","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ModelResource":{"properties":{"id":{"type":"string","pattern":"^\\w+$","title":"Resource Id","description":"The unique resource identifier."},"object":{"type":"string","pattern":"^\\w+$","title":"Resource Object","description":"The type of resource."},"name":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$"},{"type":"null"}],"title":"Name","description":"Optional name for the model."},"description":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$"},{"type":"null"}],"title":"Description","description":"Optional description for the model."},"version":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$"},{"type":"null"}],"title":"Version","description":"Optional version for the model."},"summary":{"additionalProperties":true,"type":"object","title":"Summary","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."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Optional metadata for the model. Can include fields such as the\nnumber of parameters, training dataset, training time, and other\nrelevant information."}},"type":"object","required":["id","object"],"title":"Model","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."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"ResponseValidationError"}}},"paths":{"/models/{model_id}":{"get":{"tags":["Models"],"summary":"Retrieve a model","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.","required":true,"schema":{"type":"string","maxLength":255,"minLength":1,"pattern":"^\\w+$","title":"Model Id","description":"A unique identifier for a model resource."},"name":"model_id","in":"path"}],"responses":{"200":{"description":"Returns the model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResource"}}}},"404":{"description":"Model resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Response Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationError"}}}}}}}}}
````

## 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":"v0.0.104"},"tags":[{"name":"Models","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"}],"servers":[{"url":"https://api.pending.ai/generator/v1","description":"Pending AI API Server"}],"security":[{"oauth":[""]},{"token":[""]}],"components":{"securitySchemes":{"oauth":{"type":"oauth2","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":{"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","generator_api.models:create":"Create PAI Generator models","generator_api.models:read":"Read PAI Generator models","generator_api.models:update":"Update PAI Generator models","generator_api.models:delete":"Delete PAI Generator models","generator_api.samples:create":"Create PAI Generator samples","generator_api.samples:read":"Read PAI Generator samples","generator_api.samples:update":"Update PAI Generator samples","generator_api.samples:delete":"Delete PAI Generator samples"},"authorizationUrl":"https://auth.pending.ai/authorize"}}},"token":{"type":"http","description":"Bearer token authentication.\n\nProvide a valid Pending AI authentication token. Generating tokens can be done manually through the Pending AI CLI. Ensure you have an existing account or [register now](https://lab.pending.ai/).\n\n```bash\npendingai auth login\npendingai auth token\n```","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RetrieveStatusOutput":{"properties":{"status":{"type":"string","enum":["online","idle","offline","timeout","error"],"title":"Status","description":"The status of the model. An `online` model samples at once; an\n`idle` one starts on the next sample. Generating structures can\nalso `timeout` or be unavailable if the model is `offline`."}},"type":"object","required":["status"],"title":"ModelRetrieveStatusOutput","description":"Output model for retrieving the status of a model."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"ResponseValidationError"}}},"paths":{"/models/{model_id}/status":{"get":{"tags":["Models"],"summary":"Retrieve a model status","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.","required":true,"schema":{"type":"string","maxLength":255,"minLength":1,"pattern":"^\\w+$","title":"Model Id","description":"A unique identifier for a model resource."},"name":"model_id","in":"path"}],"responses":{"200":{"description":"Returns the model status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrieveStatusOutput"}}}},"404":{"description":"Model resource not found.","content":{"application/json":{"schema":{"type":"null","title":"Return"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Response Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationError"}}}}}}}}}
````

## 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":"v0.0.104"},"tags":[{"name":"Models","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"}],"servers":[{"url":"https://api.pending.ai/generator/v1","description":"Pending AI API Server"}],"security":[{"oauth":[""]},{"token":[""]}],"components":{"securitySchemes":{"oauth":{"type":"oauth2","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":{"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","generator_api.models:create":"Create PAI Generator models","generator_api.models:read":"Read PAI Generator models","generator_api.models:update":"Update PAI Generator models","generator_api.models:delete":"Delete PAI Generator models","generator_api.samples:create":"Create PAI Generator samples","generator_api.samples:read":"Read PAI Generator samples","generator_api.samples:update":"Update PAI Generator samples","generator_api.samples:delete":"Delete PAI Generator samples"},"authorizationUrl":"https://auth.pending.ai/authorize"}}},"token":{"type":"http","description":"Bearer token authentication.\n\nProvide a valid Pending AI authentication token. Generating tokens can be done manually through the Pending AI CLI. Ensure you have an existing account or [register now](https://lab.pending.ai/).\n\n```bash\npendingai auth login\npendingai auth token\n```","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResourceList_ModelResource_":{"properties":{"object":{"type":"string","pattern":"^\\w+$","title":"Resource Object","description":"The type of resource.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelResource"},"type":"array","title":"Data","description":"A list containing the retrieved objects. The list can contain fewer\nobjects than requested if a smaller number of results were found."},"has_more":{"type":"boolean","title":"Has More","description":"A boolean flag that indicates whether there are more items available\nto be fetched on subsequent pages. Used for pagination control."}},"type":"object","required":["data","has_more"],"title":"ResourceList[ModelResource]"},"ModelResource":{"properties":{"id":{"type":"string","pattern":"^\\w+$","title":"Resource Id","description":"The unique resource identifier."},"object":{"type":"string","pattern":"^\\w+$","title":"Resource Object","description":"The type of resource."},"name":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$"},{"type":"null"}],"title":"Name","description":"Optional name for the model."},"description":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$"},{"type":"null"}],"title":"Description","description":"Optional description for the model."},"version":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9\\s.,;:!?\\(\\)]+$"},{"type":"null"}],"title":"Version","description":"Optional version for the model."},"summary":{"additionalProperties":true,"type":"object","title":"Summary","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."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Optional metadata for the model. Can include fields such as the\nnumber of parameters, training dataset, training time, and other\nrelevant information."}},"type":"object","required":["id","object"],"title":"Model","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."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ResponseValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"ResponseValidationError"}}},"paths":{"/models":{"get":{"tags":["Models"],"summary":"List models","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.","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"title":"Limit","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.","default":5},"name":"limit","in":"query"},{"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).","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255,"minLength":1,"pattern":"^\\w+$"},{"type":"null"}],"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 next 'page', or those that were submitted before the matched resource (reverse chronological order)."},"name":"next-page","in":"query"},{"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).","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255,"minLength":1,"pattern":"^\\w+$"},{"type":"null"}],"title":"Prev-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)."},"name":"prev-page","in":"query"}],"responses":{"200":{"description":"Returns a list of models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceList_ModelResource_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Response Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseValidationError"}}}}}}}}}
````
