How it works
- Your server generates a presigned URL for the S3 object, valid for a short window (30–60 seconds is usually enough).
- You send the presigned URL to the AltTextLab API as
imageUrl. - The API fetches the image, generates alt text, and returns the result.
- The presigned URL expires automatically.
Step 1: Generate a presigned URL
Use the AWS SDK for your language to sign aGetObject request. Set the expiry short enough that the URL cannot be reused — 60 seconds works for most cases.
Your AWS credentials need
s3:GetObject permission on the bucket or key. The credentials used to sign the URL are never exposed — only the signature is embedded in the URL.Step 2: Pass the presigned URL to the API
Use the signed URL asimageUrl in your generation request. Everything else works the same as with a public URL.