RecoupGet a Free AuditFree Audit

API REFERENCE

Generate Image

On this page
GET/api/image/generate

Generate high-quality images using AI models. Images are automatically stored on Arweave and include In Process moment metadata for provenance and ownership tracking.

Authentication

See the authentication guide for API key and account access requirements.

Request

cURL
curl --request GET \
  --url 'https://api.recoupable.dev/api/image/generate?prompt=YOUR_PROMPT&account_id=YOUR_ACCOUNT_ID' \
  --header 'x-api-key: YOUR_API_KEY'

Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.

Parameters

Query parameters

promptstringrequired

Text description of the image you want to generate

account_idstringrequired

The unique identifier of the account generating the image

Responses

200Image generated successfully

application/json

imagesarray<GeneratedImage>

Array of generated image objects

Item properties for images
base64string

Image file as a base64 encoded string

uint8Arrayarray<integer>

Image file as a Uint8Array (represented as array of numbers in JSON)

Item properties for uint8Array

integer

mediaTypestring

The IANA media type of the file (e.g., 'image/png', 'image/jpeg')

warningsarray<string>

Array of warning messages, if any

Item properties for warnings

string

responsesarray<ImageResponseMeta>

Array of response metadata from the AI provider

Item properties for responses
finishReasonstring

Reason the generation finished (e.g., 'stop')

providerMetadataobject

Metadata from the AI provider about the generation

Properties for providerMetadata
modelstring

The AI model used for generation (e.g., 'dall-e-3', 'gpt-image-1')

sizestring

The size of the generated image (e.g., '1024x1024')

usageobject

Token usage information for the image generation

Properties for usage
promptTokensinteger

Number of tokens used in the prompt

completionTokensinteger

Number of tokens used in the completion (typically 0 for image generation)

totalTokensinteger

Total tokens used

imageUrlstring

Permanent Arweave URL where the image is stored

arweaveResultobject

Arweave transaction object for the stored image

Properties for arweaveResult
idstring

Unique identifier for the Arweave transaction

last_txstring

Last transaction reference

ownerstring

Owner address of the transaction

tagsarray<object>

Tags associated with the transaction

Item properties for tags

object

targetstring

Target address (empty for data transactions)

quantitystring

Amount transferred (typically '0' for data transactions)

datastring

Transaction data (may be empty in response)

rewardstring

Mining reward for the transaction

signaturestring

Transaction signature

formatinteger

Transaction format version

momentobject

In Process moment metadata for provenance and ownership tracking

Properties for moment
contractAddressstring

Smart contract address for the moment

tokenIdstring

Token ID of the minted moment

hashstring

Transaction hash of the moment mint

chainIdinteger

Chain ID (e.g., 8453 for Base)

400Bad request - missing required parameters or invalid input

application/json

errorstring

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download content.json
View operation source
json
{
  "description": "Generate high-quality images using AI models. Images are automatically stored on Arweave and include In Process moment metadata for provenance and ownership tracking.",
  "parameters": [
    {
      "name": "prompt",
      "in": "query",
      "description": "Text description of the image you want to generate",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "account_id",
      "in": "query",
      "description": "The unique identifier of the account generating the image",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Image generated successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ImageGenerationResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request - missing required parameters or invalid input",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ImageGenerationErrorResponse"
          }
        }
      }
    }
  }
}