---
title: "Configuration"
manual: "Ai3 Alt Text"
version: "0.9"
permalink: "https://docs.typo3.org/permalink/wegewerk/ai3_alttext:configuration@0.9"
source: "Configuration/Index.rst"
rendered: "2026-10-23T16:31:04+00:00"
---

# Configuration {#configuration}

ai3-alttext has no extension-specific settings in the TYPO3
Extension Manager. All configuration is done via environment variables
that are read by [`wegewerk/ai3_core`](https://packagist.org/packages/wegewerk/ai3_core).

## Environment variables {#configuration-env}

The following environment variables must be set on the server before
the extension can communicate with the ZAK-AI API:

-   **ZAKAI_API_KEY**

    -   *Type:* string
    -   *Default:* (empty)

    The API key issued by ZAK-AI for your account. When this variable
    is empty, all API calls will throw a `RuntimeException`.

-   **ZAKAI_SECRET**

    -   *Type:* string
    -   *Default:* (empty)

    The shared secret used together with `ZAKAI_API_KEY` to build
    the HTTP Basic Authorization header
    (`base64(secret + ':' + apiKey)`).

Set these variables in your server environment, `.env` file, or
TYPO3 [`config/system/additional.php`](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Configuration/Typo3ConfVars/Index.html#file-project-config-system-additional-php):

**config/system/additional.php**

```php
putenv('ZAKAI_API_KEY=your-api-key');
putenv('ZAKAI_SECRET=your-secret');
```

## TCA override {#configuration-tca}

The extension overrides the `alternative` column of the
`sys_file_metadata` table to add the
**Add alttext generation to batch** field control button. No
manual TCA configuration is required.

## JavaScript modules {#configuration-js}

The extension registers its JavaScript modules under the
`@wegewerk/ai3alttext/` namespace via
`Configuration/JavaScriptModules.php`. The following modules are
available:

| Module | Purpose |
| --- | --- |
| `@wegewerk/ai3alttext/fileList.js` | Renders the file list and handles bulk selection |
| `@wegewerk/ai3alttext/fileElement.js` | Handles per-file actions (generate, approve, edit) |
| `@wegewerk/ai3alttext/subFolders.js` | Renders the folder tree and recursive accept action |
| `@wegewerk/ai3alttext/add-to-batch.js` | FormEngine field control button behaviour |
| `@wegewerk/ai3alttext/ai3api.js` | Shared Ajax helper for all backend API calls |
