Turn text into animated GIFs with AI GIF Maker. Native GIF generation — no video conversion. Type what you want and download your GIF in about a minute.
This is the official Clojure SDK for AI GIF Maker. One call sends your prompt, waits for the GIF and returns its URL.
(require '[aigifmaker.core :as gif])
(gif/generate "a corgi in sunglasses dancing on a beach, looping")
;; => URL of the finished GIF
deps.edn:
io.github.hanshs474/aigifmaker-clj {:mvn/version "0.1.0"}
Leiningen:
[io.github.hanshs474/aigifmaker-clj "0.1.0"]
A thin wrapper over the zero-dependency Java client io.github.hanshs474/aigifmaker on Maven Central.
Create a key at https://aigifmaker.ai/settings/apikeys, then pass it as :api-key or export it:
export AIGIFMAKER_API_KEY=sk-...
Each GIF costs 1 credit on your AI GIF Maker account, the same as on the website. New accounts get one free GIF (it carries a small aigifmaker.ai badge). A GIF that fails to generate gives its credit back. Credit packs are on the pricing page.
(gif/credits) ;; remaining credits, free to call
(def id (gif/submit "happy birthday text bouncing in rainbow letters"))
(gif/status id) ;; => {:id ... :status "pending" | "processing" | "success" | "failed" :url ... :queued ...}
A run from an account that has not bought credits yet may wait in a short queue first (:queued true while :status stays "processing"). That is normal; generate keeps polling every 3 seconds, for up to 15 minutes by default.
Options map: :api-key, :base-url, :timeout-ms, :poll-ms, or :client (a configured Java client).
Failures throw ex-info whose data carries :reason:
:auth: no key, or the key is wrong or deleted:quota: the account is out of credits:rejected: the content filter refused the prompt, or a cooldown is active; reword it:failed: the run was accepted but failed; the message says why:timeout: the wait ran out; the GIF may still finish in your historyAnything else is :other with the server's message.
java -cp <clojure, spec.alpha, core.specs.alpha and aigifmaker jars>:src:test clojure.main -m aigifmaker.core-test
AIGIFMAKER_SMOKE=1 ... # plus two free live checks, no generation
MIT licensed. Questions: support@aigifmaker.ai
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |