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-generationParameters
| Name | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text description of the image you want to generate |
| artist_account_id | string | Yes | The 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 soonResponse 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
| Property | Type | Description |
|---|---|---|
| status | string | Status of the request ("success" or "error") |
| data | object | The generated image data |
| data.image_url | string | Permanent Arweave URL where the image is stored |
| data.post_id | string | Unique identifier for the associated post |
| data.artist_id | string | Artist identifier for attribution |
| data.created_at | string | ISO 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
| Code | Description |
|---|---|
| invalid_prompt | The provided prompt is empty or contains invalid content |
| invalid_artist | The provided artist_account_id is invalid or not found |
| generation_failed | The image generation process failed |
| storage_failed | Failed to store the image on Arweave |
| rate_limit_exceeded | You 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