Skip to content

Generate Image

Generate high-quality images using OpenAI's GPT-4o model. Images are automatically stored on the Arweave blockchain and associated with your artist profile.

Endpoint

GET https://api.recoupable.com/api/image-generation

Parameters

NameTypeRequiredDescription
promptstringYesText description of the image you want to generate
artist_account_idstringYesThe unique identifier of the artist generating the image

Request Examples

cURL
curl -X GET "https://api.recoupable.com/api/image-generation?prompt=A vibrant digital artwork of a sunset&artist_account_id=YOUR_ARTIST_ID" \
  -H "Content-Type: application/json"
  # -H "Authorization: Bearer YOUR_API_KEY" # Coming soon

Response Format

The API returns JSON responses. Here's an example success response:

{
  "status": "success",
  "data": {
    "image_url": "https://arweave.net/YOUR_IMAGE_ID",
    "post_id": "post123",
    "artist_id": "artist123",
    "created_at": "2024-03-27T15:00:00Z"
  }
}

Response Properties

Response Object

PropertyTypeDescription
statusstringStatus of the request ("success" or "error")
dataobjectThe generated image data
data.image_urlstringPermanent Arweave URL where the image is stored
data.post_idstringUnique identifier for the associated post
data.artist_idstringArtist identifier for attribution
data.created_atstringISO timestamp of when the image was generated

Error Responses

The API returns error responses in the following format:

{
  "status": "error",
  "error": {
    "code": "invalid_prompt",
    "message": "The provided prompt is invalid or empty"
  }
}

Common Error Codes

CodeDescription
invalid_promptThe provided prompt is empty or contains invalid content
invalid_artistThe provided artist_account_id is invalid or not found
generation_failedThe image generation process failed
storage_failedFailed to store the image on Arweave
rate_limit_exceededYou have exceeded the rate limit for image generation

Notes

  • Images are generated using OpenAI's GPT-4o model
  • All generated images are automatically stored on the Arweave blockchain
  • Each generation creates an associated post with proper artist attribution
  • The API has rate limits for image generation (contact support for details)
  • Generated images are permanent and cannot be deleted from Arweave
  • Content filtering is applied to all prompts to ensure appropriate content