Skip to main content
Otto’s /generate-meme API creates images from text and edits images supplied by public URL. Despite the route name, it also handles illustrations, product concepts and other image-generation tasks; one paid request returns one generated image.

Choose a request

Use POST /generate-meme with a JSON body. Read the current input schema and indicative price before preparing a call; the payment challenge is the price authority. The endpoint uses fal.ai to run the selected model. Model choice affects the result; use a clear scene-level prompt and inspect the generated image before incorporating it into a finished artifact.

Inspect a generation request

This example requests a price challenge for an illustration:
This unpaid call returns 402 and does not generate an image. Inspect the current OpenAPI and declared output, then use the HTTP payment client with an approved per-call cap and the same JSON body. For an edit, add your image’s public HTTPS URL as image_url and describe what to change in prompt. The service fetches that URL and passes the image to its generation provider. A local file path or a page that requires your browser login cannot substitute for a publicly accessible image.

Save and verify the image

A successful HTTP response has these top-level fields: Download the image before expiresAt if you want to keep it. Preserve the original request, result URL, model and payment receipt, then check the actual image for composition, spelling and whether the requested edit was followed. A returned URL alone does not establish visual quality. The ACP image_and_meme_gen offering uses a different job envelope and requires does_this_prompt_meet_safety_guidelines: true; the HTTP body above does not require that ACP confirmation field. ACP also names the model in model_used, while this HTTP response uses model.

Limits and failures

Image requests must meet the selected model’s content policy. A policy block returns a failed result; check the HTTP status and payment receipt to establish whether a charge occurred. Invalid model values or unsafe/unreachable image URLs can fail; a price challenge alone does not validate the request. Keep the exact request and any receipt if a paid call times out or returns an error. Follow HTTP failure handling before submitting a replacement request, which may incur another charge. Images use a flat per-image price, without an unspent-budget refund step; video generation has a different pricing and delivery contract.