API REFERENCE
Generate image (GET)
On this page
/api/image/generateGenerate an image using AI models. Generated images and related metadata use public Supabase Storage; anyone with a returned URL can read them without authentication. Existing Arweave URLs remain readable, but new image uploads do not create Arweave transactions. In Process moment creation remains best-effort.
A 200 response may be partial: if storage fails after generation, imageUrl and moment are null and uploadError describes the failure. Check imageUrl before treating the result as a stored image. The deprecated arweaveResult field is always null; arweaveError is retained as an alias of uploadError when a storage error is present. This does not change private Files or release-pack source-audio storage.
Authentication
See the authentication guide for API key and account access requirements.
Request
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.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request GET \
--url 'https://api.recoupable.dev/api/image/generate'Parameters
Query parameters
promptstringrequiredText description of the image you want to generate
account_idstringrequiredThe unique identifier of the account generating the image
Responses
200Image generated successfully+
application/json
usageobjectrequiredToken usage information for the image generation
Properties for usage
promptTokensintegerNumber of tokens used in the prompt
completionTokensintegerNumber of tokens used in the completion (typically 0 for image generation)
totalTokensintegerTotal tokens used
imageUrlstring | nullrequiredPublic Supabase Storage URL of the stored image, or null when storage fails. It is not a signed private URL.
format: uri
arweaveResultnullrequiredDeprecated compatibility field. Always null: new uploads do not create Arweave transactions.
momentany ofrequiredBest-effort In Process result, or null when no moment was created. A stored image does not guarantee moment creation.
Properties for moment
anyOf · InProcessMoment 1
In Process moment metadata for provenance and ownership tracking
contractAddressstringSmart contract address for the moment
tokenIdstringToken ID of the minted moment
hashstringTransaction hash of the moment mint
chainIdintegerChain ID (e.g., 8453 for Base)
anyOf · null 2
null
imageobjectrequiredGenerated image data from the model. Storage outcome is reported separately by imageUrl and uploadError.
Properties for image
base64stringImage 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
mediaTypestringThe IANA media type of the file (e.g., 'image/png', 'image/jpeg')
uploadErrorstringPresent if storing the generated image fails. A partial result can still have HTTP status 200.
Example: "Could not store generated image"
arweaveErrorstringDeprecated alias of uploadError, present with the same value when storage fails. It does not identify an Arweave operation.
400Bad request - missing required parameters or invalid input+
application/json
errorstringError message describing what went wrong
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download content.jsonView operation source
{
"operationId": "getImageGenerate",
"description": "Generate an image using AI models. Generated images and related metadata use public Supabase Storage; anyone with a returned URL can read them without authentication. Existing Arweave URLs remain readable, but new image uploads do not create Arweave transactions. In Process moment creation remains best-effort.\n\nA 200 response may be partial: if storage fails after generation, imageUrl and moment are null and uploadError describes the failure. Check imageUrl before treating the result as a stored image. The deprecated arweaveResult field is always null; arweaveError is retained as an alias of uploadError when a storage error is present. This does not change private Files or release-pack source-audio storage.",
"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"
}
}
}
}
}
}