Alt text

Generate an alt text string, 1 to 160 characters, for an existing image.

POST /image/alt writes alt text for one image. There is no model field. Mynth picks the model and keeps it current. The result is a string of 1 to 160 characters, written to be read aloud.

import Mynth from "@mynthio/sdk";

const mynth = new Mynth();

const result = await mynth.image.alt({ url: "https://cdn.example.com/lighthouse.png" });

console.log(result.alt);

The body takes only url, a public http(s) image URL. The SDK also accepts a file, and the CLI a local path. Both upload it first. The request does not take webhook or metadata, and the response has no pat_ token.

The REST call returns a task. The task's result is:

{ "alt": "A white lighthouse on dark rocks, lit by an orange sunset sky" }

A URL Mynth cannot fetch fails the task with FETCH_FAILED.

Price#

$0.0004 per image, charged only when the task succeeds. See pricing.

Next steps#