openapi: 3.1.0
info:
title: Art Blocks Generator 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: Generator
description: Live generative artwork view endpoints.
paths:
/{chainId}/{contractAddress}/{tokenId}:
get:
operationId: getTokenLiveView
summary: Get live generative artwork view
description: Returns an HTML page containing the live generative artwork for a given token, suitable for embedding in an iframe. The page executes the artist's on-chain script in the browser using the token's deterministic hash as the PRNG seed. This is the canonical live view of the artwork as defined by the on-chain contract.
tags:
- Generator
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.
schema:
type: integer
example: 385000000
responses:
'200':
description: HTML page rendering the live generative artwork. Suitable for use as an iframe src.
content:
text/html:
schema:
type: string
description: HTML document executing the generative art script.
'400':
description: Invalid parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Token not found.
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/