# Connect your Hygraph project to AltText.ai

Learn how to connect your Hygraph project to AltText.ai to automatically generate alt text for your images using AI.

AltText.ai is a service that offers plugins and APIs to use its AI to generate alt text for images in over 130 languages.

## What you can do with the AltText.ai integration

With this app, you can automatically generate alt text for your images within Hygraph.

The app uses AI from AltText.ai to process the contents of the image and automatically adds the relevant alt text to the asset.

## Prerequisites to use this integration

- You must have a **Hygraph** account. If you don't have one, you can create one [here](https://app.hygraph.com/signup).
- You must have a [Hygraph project](https://hygraph.com/classic-docs/getting-started/fundamentals/quickstart#create-a-project) with at least one [model](https://hygraph.com/classic-docs/getting-started/fundamentals/quickstart#create-a-model).
- You must have an **AltText.ai** account. If you don't have one yet, you can get one [here](hhttps://alttext.ai/users/sign-up).
- You must have an AltText.ai **API access key**. To generate API keys, navigate to [`Account > API Keys`](https://alttext.ai/account/api_keys) in your **AltText.ai** account, click on the `+ New API Key` button, type in a name for the API key, then click on `Create`. You can then click on the `Copy` button to copy it and use it in your Hygraph project.

## Install the AltText.ai app

Click [here](https://hygraph.com/marketplace/apps/alttextai) to install the **AltText.ai** App on **Hygraph**, then follow these steps:

[Video](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/qqsVZAAgTNuQlG9QS2xy)

1. Use the dropdowns to select which project and environment you want to install the app in, then click on the `Add App` button.
2. Click on the `Authorize app` button on the **App permission authorization** screen.
3. The **Configure AltText.ai** section of your Hygraph project dashboard will display next. This screen details the steps you must follow:
   - **Step 1** links you to AltText.ai to create an account. You can skip this step if you already have one.
   - **Step 2** contains a checkbox which you must leave selected if you want the `Alt Text` field to be added to your `Assets` model automatically.
   - **Step 3** contains the installation button. Click on it to proceed.
4. Fill in the `AltText.ai API Key` field. [This document section](https://hygraph.com/classic-docs/integrations/connect-alttextai#prerequisites-to-use-this-integration) explains how to get your API keys.
5. Select a language for the alt text using the `Alt Text Language` dropdown. The default value is set to `English`.
6. Optionally, you can edit the `Alt Text Field ID` under **Advanced**. You can set the ID of the Asset field which holds alt text, and AltText.ai will populate this text field.
7. Click on the `Save` button. A pop-up notification in the lower right corner of the screen will indicate that the changes have been saved.

## Use AltText.ai in your Hygraph project

[Video](https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/Z0wRZeTDSIqa7MBNc1Im)

To use AltText.ai and start generating alt text for your image assets, navigate to the **Assets** section of your project, and click on the pencil icon to edit an existing asset entry, or create a new one by clicking on the `+ Add entry` button located at the top right corner of the screen.

The entry form contains the `Alt Text` field and the sidebar contains the `Update Alt Text` button. Click on the button to populate the alt text field.

**Warning:**

The AltText.ai app generates alt text on an asset basis, not on an entry basis. If you want to use an image asset more than once but want each to have different alt text, you must duplicate the asset first.

To duplicate an asset entry, click on the pencil icon to access the edit view, then click on the context menu next to **Edit asset**, located at the top of the screen. You will find the `Duplicate` option there.

## Resources

- [AltText.ai get started documents](https://alttext.ai/dashboard/get_started)
- [AltText.ai Developer API documents](https://alttext.ai/apidocs)
