NSFW

NSFW AI API: adult image and video generation from your own code

What the Genlaxy API allows for adult content, how refusals come back to your code, and the checks your own app should add before it sends a prompt.

4 min read
A vintage brass telegraph key on a dark wooden base, lit from behind by violet light in soft haze

If you are building an adult product, a companion app, an art tool or a private generator for your own use, you can call the same models the studio uses from your own code. This is a checklist for doing that with NSFW content specifically: what the API allows, how it says no, and what is your job rather than ours. The general mechanics (keys, endpoints, a ready request per model) are on the API page.

1. Know what the API allows

The API follows the same terms as the studio, word for word. Adult content between adults is allowed. Three things are not, ever: sexual content involving minors or age-play, content depicting non-consent, and sexual or intimate images of a real, identifiable person. On top of that, each model runs at a provider with its own moderation, and some models refuse adult prompts entirely.

The model list the API returns has no adult flag, for the same reason the catalog has none: providers change their rules, and a flag we cannot keep true would mislead you. Test the models you plan to use with one plainly adult request each, and build your model list from the ones that pass. Our guide to NSFW image models describes the test.

2. Handle the two kinds of refusal

Your code will meet refusals from two places, and they arrive differently:

  • Our screen, synchronously. Every free-text field of a request is checked before anything is charged. A prompt involving minors comes back at once as a 400 with the code PROMPT_REJECTED_MINOR; sexual violence or gore as PROMPT_REJECTED_VIOLENCE. No render is created and your balance is untouched.
  • The provider, later. The request is accepted and charged, the render starts, and the provider refuses it. When you poll, the render ends with refunded: true and the failure code MODERATION_REJECTED, and the charge is already back on your balance.

Treat the first as final: do not retry it, and do not reword it automatically. Treat the second as a signal about the model: retrying the same inputs on the same model usually fails the same way, so route to the next model on your tested list or tell the user plainly that this model declined.

Prompt
{ "modelId": "<id from the models list>", "inputs": { "prompt": "Nude portrait of an adult man in his forties standing by a rain-streaked window at night, city lights behind him, low-key lighting, 85mm lens" } }
A request body for POST /api/v1/api/catalog/generations. The fields inside inputs differ per model; the API page builds the exact body for each one.

Write ages into prompts the way you would for a person: "a woman in her thirties", "a man in his forties". Before an image or video prompt is sent, words like "girl" and "boy" are rewritten to adult wording, so a prompt that says "adult woman" in the first place renders closer to what your user asked for.

3. Add the checks that are yours

Our screen is a floor, not your moderation. The terms make you responsible for everything generated with your key, including by your own users, and they ask you to restrict your service to people of legal age. In practice that means:

  1. An age gate in front of any feature that generates adult content, before the first request, not after.
  2. Your own prompt check before you call us, so that a user who types something prohibited is stopped and logged on your side. Our refusal codes are a second line, not the first.
  3. No uploads of real people into adult flows. If your app takes a start frame or a reference image, do not let it be a photo of an identifiable person when the result is sexual.
  4. A record of who asked for what, keyed to your own user id, so that when something goes wrong you can act on the right account.

4. Money, keys and files

  • One balance. API renders are paid from the same balance as the studio at the same prices, in euro cents. The smallest top-up is €5.00.
  • Idempotency. Send an Idempotency-Key header with every create call, so a network retry never charges you twice.
  • Keys stay on your server. A key starts with gl_live_, is shown once, and belongs in a server-side secret, never in a browser or an app bundle. Revoke it in Settings if it leaks.
  • Download promptly. Finished files are deleted after a retention period, so copy the result to your own storage as soon as the render succeeds.

Video works the same way through the API; our notes on animating an adult still apply unchanged, including why video models refuse more often than image models.

Questions

Does the Genlaxy API allow NSFW generation?

Yes, for adult content between adults, under the same terms as the studio. Content involving minors, non-consent or real identifiable people is always refused, and some models refuse adult prompts at their provider.

How does the API report a refused NSFW prompt?

A prompt our screen refuses gets a 400 with PROMPT_REJECTED_MINOR or PROMPT_REJECTED_VIOLENCE and is never charged. A render the provider refuses ends refunded, with the failure code MODERATION_REJECTED.

Who is responsible for what my users generate?

You are. The terms make the key holder responsible for everything generated with the key, including by their users, and ask that the service be restricted to people of legal age.

#NSFW#API#Developers

Keep reading

All articles →