openapi: 3.1.0 info: title: Art Blocks Generator Media API description: Returns an iframe-able live view of the generative artwork associated with a given Art Blocks token. The live view runs the artist's on-chain script in the browser using the token's deterministic hash as a seed, producing the canonical on-chain artwork output. Useful for embedding live artwork in external applications and marketplaces. version: 1.0.0 contact: name: Art Blocks Developer Documentation url: https://docs.artblocks.io/developer/token-and-generator-apis/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: https://generator.artblocks.io description: Production (Ethereum, Arbitrum One, Base) - url: https://generator.staging.artblocks.io description: Staging (Sepolia testnet) tags: - name: Media description: Static image media proxy endpoints. paths: /{chainId}/{contractAddress}/{tokenId}.png: get: operationId: getTokenStaticImage summary: Get static PNG render of token artwork description: Returns a static PNG image of the Art Blocks token artwork, captured by a headless browser executing the generative script. This is the canonical static image used on artblocks.io and by NFT marketplaces for thumbnail display. tags: - Media parameters: - name: chainId in: path required: true description: Chain ID of the network. Use 1 for Ethereum, 42161 for Arbitrum One, 8453 for Base. schema: type: integer enum: - 1 - 42161 - 8453 example: 1 - name: contractAddress in: path required: true description: Ethereum address of the Art Blocks core contract. schema: type: string pattern: ^0x[a-fA-F0-9]{40}$ example: '0x99a9b7c1116f9ceeb1652de04d5969cce509b069' - name: tokenId in: path required: true description: The ERC-721 token ID (without .png extension in the parameter value). schema: type: integer example: 385000000 responses: '200': description: Static PNG image of the token's generative artwork. content: image/png: schema: type: string format: binary '302': description: Redirect to the cached image CDN URL. headers: Location: schema: type: string format: uri description: URL of the cached image. '400': description: Invalid parameters. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Token image not found or not yet rendered. content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object properties: message: type: string description: Human-readable error message. externalDocs: description: Art Blocks Developer Documentation url: https://docs.artblocks.io/developer/token-and-generator-apis/