Generate uncensored images with an API
All guides

Guide · 4 min read

Generate uncensored images with an API

Send a prompt and receive a CDN URL. Uses the same image models as the Goonify app.

POST /v2/jobs with goonify/cnidia and a prompt. The job returns a public id such as gen_18402.

Poll GET /v2/jobs/{id} or pass webhook_url. When status is completed, download output.url.

A still on cdn.goonify.ai you can drop into a product, a bot, or a pipeline.

Steps

  1. 1

    Create a sandbox key.

  2. 2

    POST /v2/jobs with goonify/cnidia and input.prompt.

  3. 3

    Poll GET /v2/jobs/{id} or wait for a webhook.

  4. 4

    Download output.url from the CDN.

Install the SDK

pip install "goonify @ git+https://github.com/Goonify/goonify.git#subdirectory=sdks/python"

Modelgoonify/cnidia

from goonify import Goonify

client = Goonify()  # GOONIFY_API_KEY=sk_test_...

job = client.run(
    "goonify/cnidia",
    input={
        "prompt": "a woman standing in a sunlit studio, photorealistic, film still",
    },
)
print(job.output["url"])

What it looks like

Run it with a sandbox key

Sandbox keys return example media and spend nothing. Switch to a live key when you are ready.

Next recipes