Skip to main content
GET
/
api
/
image
/
generate
cURL
curl --request GET \
  --url https://recoup-api.vercel.app/api/image/generate \
  --header 'Authorization: Bearer <token>'
{
  "images": [
    {
      "base64": "<string>",
      "uint8Array": [
        123
      ],
      "mediaType": "<string>"
    }
  ],
  "warnings": [
    "<string>"
  ],
  "responses": [
    {
      "finishReason": "<string>"
    }
  ],
  "providerMetadata": {
    "model": "<string>",
    "size": "<string>"
  },
  "usage": {
    "promptTokens": 123,
    "completionTokens": 123,
    "totalTokens": 123
  },
  "imageUrl": "<string>",
  "arweaveResult": {
    "id": "<string>",
    "last_tx": "<string>",
    "owner": "<string>",
    "tags": [
      {}
    ],
    "target": "<string>",
    "quantity": "<string>",
    "data": "<string>",
    "reward": "<string>",
    "signature": "<string>",
    "format": 123
  },
  "moment": {
    "contractAddress": "<string>",
    "tokenId": "<string>",
    "hash": "<string>",
    "chainId": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

prompt
string
required

Text description of the image you want to generate

account_id
string<uuid>
required

The unique identifier of the account generating the image

Response

Image generated successfully

Response from the image generation endpoint, extending Experimental_GenerateImageResult from the AI SDK

images
object[]

Array of generated image objects

warnings
string[]

Array of warning messages, if any

responses
object[]

Array of response metadata from the AI provider

providerMetadata
object

Metadata from the AI provider about the generation

usage
object

Token usage information for the image generation

imageUrl
string

Permanent Arweave URL where the image is stored

arweaveResult
object

Arweave transaction object for the stored image

moment
object

In Process moment metadata for provenance and ownership tracking