# PAI Generator

Pending AI's Molecule Generator capability is designed to yield high-throughput novel and diverse molecule sampling ideal for expanding into untouched chemical spaces rapidly. The service provides a simple integration for dedicated AI inference with one of Pending AI's innovative generative models.

See the **capability** page for more information:

{% content-ref url="/pages/wK2lO6QAKZOEG9j5xLRv" %}
[Generative AI](/capabilities/generative-ai.md)
{% endcontent-ref %}

***

## Workflow Summary

Access to Pending AI's Molecule Generator models simplifies the workflow in drug discover pipelines for branching into different chemical spaces for targeted or broad molecular distributions. Building large-scale compound libraries is made possible through repeatedly requesting [**samples**](/api-reference/pai-generator/sampling-structures.md) from a generative [**model**](/api-reference/pai-generator/generative-models.md) when specifying an `id`.

{% @mermaid/diagram content="stateDiagram-v2
a: Inspect Molecule Generator Models
b: Request a Sample from a Model
ScreeningCampaign: Screening Campaign
SubspaceClustering: Subspace Clustering
state ScreeningCampaign {
c: Collect Molecules for a Compound Library
d: Screen Molecules for Synthetic Accessibility
e: Filter for Optimal Drug-Likeness and Target Affinity
c --> d
d --> e
}
state SubspaceClustering {
f: Collect Unique Molecules of Interest
g: Cluster Molecules using any Algorithm
f --> g
}
b --> ScreeningCampaign
b --> SubspaceClustering
SubspaceClustering --> ScreeningCampaign : Identify clusters with optimal synthetic accessibility
\[*] --> a
\[*] --> b
" %}

See the available [Guides](/developer-tools/guides.md) for more implementation possibilities when integrating with existing drug discovery pipelines.

***

## Frequently Asked Questions

<details>

<summary>Q: How do I decide which model to use?</summary>

A: Refer to the [**capability**](/capabilities/generative-ai.md) page for a detailed breakdown of each model's strengths. Consider the optimal model based on the primary metric for the intended purpose. Otherwise, any model is generally favourable for sampling drug-like novel and diverse molecules.

</details>

<details>

<summary>Q: How many molecules can I generate in one request?</summary>

A: Sampling is rate limited by Pending AI servers to prevent excessive content transferred in one request. Multiple smaller samples are made when specifying a number of molecules. The API limits requests at 2000 molecules to speed up individual responses and compressing results but there is no limit to how many times you can sample molecules from any given model.&#x20;

</details>

<details>

<summary>Q: What does it mean if a model status is <code>offline</code> or <code>error</code>?</summary>

A: Since inference models require expensive resource requirements and can have many people request molecules simultaneously, under certain conditions a model may be unavailable and set as `offline`. When an unexpected error occurs for the <mark style="color:$primary;">**PAI Generator**</mark> service, the model is given an `error` status instead. Otherwise it will be labelled as `online`.

</details>

<details>

<summary>Q: Can there be duplicate SMILES returned when sampling?</summary>

A: Within a given sample request no duplicates are returned. It should be considered that when generating molecules from the same model the chemical space captured by the AI embedding architecture is not infinite and there is always a possibility (although highly unlikely).&#x20;

</details>


---

# 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.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.
