Skip to main content
Rewards, promotions, raffles, and levels each support an image shown in the Rigaly app. Every one has a matching image endpoint: All four accept the same three input styles — pick whichever your pipeline produces (JPEG, PNG, or WebP, max 5MB):
  1. multipart/form-data with an image file field — a normal file upload.
  2. JSON image_base64 — raw base64 plus content_type, or a data: URI. This is what AI image APIs return, so you can generate and attach in one flow.
  3. JSON image_url — a public https URL that Rigaly downloads server-side.
The response returns the hosted image_url. DELETE on the same path removes it.

Create a reward with an AI-generated image

The pattern: create the reward, generate the artwork with an image model, then attach it. Because the image endpoint accepts base64 directly, the model’s output goes straight to Rigaly — no file handling, no separate hosting.
Already have the image hosted somewhere? Skip base64 and pass { "image_url": "https://…" } instead.

Doing it by chatting with an AI assistant

With the AI connector, the assistant has set_reward_image, set_promotion_image, set_raffle_image, and set_tier_image tools — each takes an image_url. This works best when the artwork already lives at a public URL. For example: “Create a ‘Free coffee’ reward for 1,000 points and set its image to https://mycdn.com/coffee.png.” The assistant creates the reward and attaches the image in one go.
Images an assistant generates inside the chat usually don’t have a public URL, so it can’t hand them to the connector directly — a known limitation of today’s AI chat platforms. Until that changes, the reliable paths are: attach from a public image_url by chatting, or use the base64 API flow above in a script for fully automated “generate + attach” pipelines.