> For the complete documentation index, see [llms.txt](https://imagine-art-ai-documentation.gitbook.io/imagine-art-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://imagine-art-ai-documentation.gitbook.io/imagine-art-ai/get-api-key.md).

# Get API key

In order to generate art from text we need an AI model called Stable Diffusion.

## Get the token from replicate

Please go to this website: <https://replicate.com/stability-ai/stable-diffusion>, and click on **Run With Api.** It will ask you to login with **Github**, so just do it.

After you create an account using **Github**, please head to your account page and copy the TOKEN given to you from here <https://replicate.com/stability-ai/stable-diffusion>

<figure><img src="https://3785147945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQrpnL8A3EPZRVlvTwwK%2Fuploads%2F2SCL1aiaDHzdJVOlcfD4%2FScreen%20Shot%202022-10-08%20at%2015.34.29.png?alt=media&amp;token=f84d3442-843f-478f-8cd8-871913597210" alt=""><figcaption></figcaption></figure>

## Paste the token in the app

Please open the app files, then open the **api** folder then open the **APIConstants.kt** file. **api/APIConstants.kt**

<figure><img src="https://3785147945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQrpnL8A3EPZRVlvTwwK%2Fuploads%2FhyR8N2oOldcmx4CJdM9g%2FScreen%20Shot%202022-10-08%20at%2014.40.38.png?alt=media&amp;token=2767eb32-456e-4238-a017-8d6d66b52146" alt=""><figcaption></figcaption></figure>

You can see the **TOKEN\_KEY** variable, paste your key between these two parentheses **" ",** in other words, change the **YOUR-OWN-API-KEY** to your own token.
