Official Elixir SDK for AI GIF Maker: turn text into animated GIFs.
{:ok, url} = Aigifmaker.generate("a corgi in sunglasses dancing on a beach")
{:ok, left} = Aigifmaker.credits()Pass api_key: or set AIGIFMAKER_API_KEY; create a key at
https://aigifmaker.ai/settings/apikeys. Each GIF costs 1 credit on your
AI GIF Maker account, the same as on the website.
Failures are {:error, reason, message} where reason is :auth, :quota,
:rejected, :failed, :timeout or :other.
Options for every call: :api_key, :base_url ("https://aigifmaker.ai"),
:timeout (milliseconds generate/2 and wait/2 keep polling, 15 minutes),
:poll_ms (3000).
Uses only :httpc from OTP and the standard JSON module; no dependencies.
Summary
Functions
Remaining credits on the account. Free to call.
Generates one animated GIF and returns its URL.
Returns the task record: a map with "id", "status" ("pending",
"processing", "success" or "failed"), "images" (the GIF URL first,
once it succeeds) and, while an account without purchased credits waits its
turn, "queued" => true.
Starts one GIF and returns its task id without waiting.
Turns a response envelope into {:ok, data} or the error that says what to
do next. Every response is HTTP 200; the JSON code tells success from refusal.
Polls a task every 3 seconds until it finishes and returns the GIF URL.
Types
Functions
Remaining credits on the account. Free to call.
Generates one animated GIF and returns its URL.
Returns the task record: a map with "id", "status" ("pending",
"processing", "success" or "failed"), "images" (the GIF URL first,
once it succeeds) and, while an account without purchased credits waits its
turn, "queued" => true.
Starts one GIF and returns its task id without waiting.
Turns a response envelope into {:ok, data} or the error that says what to
do next. Every response is HTTP 200; the JSON code tells success from refusal.
Polls a task every 3 seconds until it finishes and returns the GIF URL.