# Generative

Currently, we support the following AI models:

* [Open AI GPT](#open-ai-gpt)
* [Open AI DALL·E](#open-ai-dall-e)
* [Akool Faceswap](#akool-faceswap)

## Open AI GPT

<figure><img src="https://4112697954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWlALaQ4M4Jr8FQTSwv7h%2Fuploads%2Faf2FDZ5nJaLYAkmaUOoJ%2FScreen%20Shot%202023-08-06%20at%2011.13.33%20PM.png?alt=media&#x26;token=10e2168a-e028-4126-ac70-5ffddb0eaa61" alt="" width="353"><figcaption><p>Open AI LLM</p></figcaption></figure>

### Parameters:

* **Model**

<table><thead><tr><th width="167">Model</th><th width="251">Description</th><th width="144">Max Tokens</th><th>Training Date</th></tr></thead><tbody><tr><td>gpt-4</td><td>More capable than gpt-3.5 and able to perform more complex tasks and return more precise answers.</td><td>8,192 tokens</td><td>Up to Sep 2021</td></tr><tr><td>gpt-3.5 turbo</td><td>Can perform most tasks and return well-structured answers.</td><td>4,096 tokens</td><td>Up to Sep 2021</td></tr><tr><td>DALL·E</td><td>Create realistic images and art from a description.</td><td> -</td><td>-</td></tr></tbody></table>

Check [Open AI doc](https://platform.openai.com/docs/models/overview) for more details of the gpt models.

* **Role**

<table><thead><tr><th width="149.5">Role</th><th>Description</th></tr></thead><tbody><tr><td>system</td><td>It sets up the context and behavior of the assistant.</td></tr><tr><td>user</td><td>It's used to give instructions to the assistant. It is typically generated by the end user. But you as a developer can also provide some potential user prompts beforehand.</td></tr><tr><td>assistant</td><td>We provide the assistant with some information in advance so that it gives us the response we expect from the API.</td></tr></tbody></table>

* **Temperature**

Lower values for temperature result in more consistent outputs, while higher values generate more diverse and creative results. Select a temperature value based on the desired trade-off between coherence and creativity for your specific application.

* **Max Token**

The character count of your request. Try to set the `max_tokens` value as close to your expected response size as possible.

* **Prompt**

A prompt is an instruction or discussion topic a user provides for the GPT AI model to respond to.

The prompt can be a question, statement, or any other stimulus intended to spark creativity, reflection, or engagement.

You can use the prompt to generate ideas, share thoughts, or start a conversation.

## Open AI DALL·E

Create realistic images and art from a description.

<figure><img src="https://4112697954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWlALaQ4M4Jr8FQTSwv7h%2Fuploads%2FFMN5eVulgtIXrg4OQxkU%2FScreen%20Shot%202023-08-07%20at%2012.16.57%20AM.png?alt=media&#x26;token=94b25c90-8458-418f-95cf-7401636d3e94" alt="" width="375"><figcaption><p>Open AI DALL·E </p></figcaption></figure>

### Parameters:

* **n:** number of images you want to generate. You can request 1-10 images at a time.
* **size:** image size. Smaller sizes are faster to generate.&#x20;
* **prompt:** a short description about the image you want to generate. The more detailed the description, the more likely you are to get the result that you want.

## Akool Faceswap

Swap faces between arbitrary faces for images. For example, a user can input his selfie `start-0`and swap the face on the figure image `res-ld-0.`

<figure><img src="https://4112697954-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWlALaQ4M4Jr8FQTSwv7h%2Fuploads%2FLusAAFRGxMzDL0RVUMX8%2FScreen%20Shot%202023-08-07%20at%204.39.22%20PM.png?alt=media&#x26;token=913e8d1a-164c-456b-b03c-c3e71a0cefd4" alt=""><figcaption><p>Face Swap</p></figcaption></figure>

### Parameters:

* **Figure Image data:** A figure image for face swapping.
* **Face Image data:** A face image that you want to swap with the figure image.
