Connect your Hygraph project to AltText.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.
- You must have a Hygraph project with at least one model.
- You must have an AltText.ai account. If you don't have one yet, you can get one here.
- You must have an AltText.ai API access key. To generate API keys, navigate to
Account > API Keysin your AltText.ai account, click on the
+ New API Keybutton, type in a name for the API key, then click on
Create. You can then click on the
Copybutton to copy it and use it in your Hygraph project.
#Install the AltText.ai app
Click here to install the AltText.ai App on Hygraph, then follow these steps:
- Use the dropdowns to select which project and environment you want to install the app in, then click on the
- Click on the
Authorize appbutton on the App permission authorization screen.
- 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 Textfield to be added to your
- Step 3 contains the installation button. Click on it to proceed.
- Fill in the
AltText.ai API Keyfield. This document section explains how to get your API keys.
- Select a language for the alt text using the
Alt Text Languagedropdown. The default value is set to
- Optionally, you can edit the
Alt Text Field IDunder Advanced. You can set the ID of the Asset field which holds alt text, and AltText.ai will populate this text field.
- Click on the
Savebutton. 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
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.
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.