#
API Overview
An overview of the current Art Blocks APIs.
We are currently in the process of working on finalizing a more comprehensive project-oriented API which we plan to release in the first half of 2022. This API will encapsulate both onchain data (the information readily available via the Art Blocks public subgraph on The Graph) and additional off-chain data (e.g., all available features for a given project)
Quick Links:
Token API Generator API Media API/Media Server Art Blocks Subgraph
#
Hosted APIs
As a quick overview, the main APIs that exist currently are:
#
Token API
Provides the token metadata for a given Art Blocks token.
Mainnet
- Note: Contract address is required for Engine
Testnet
#
Generator API
Provides an i-frame-able live-view for the art associated with a given Art Blocks token.
Mainnet
- Note: Contract address is required for Engine
Testnet
#
Media API/Media server
Provides a static snapshot of the rendered live-view for a given Art Blocks token.
Mainnet (Flagship)
In addition to the standard static renders provided for each token, there are two other static renders currently provided: "HD" and "thumbnail". These items can be found at:
- HD Renders –
https://media.artblocks.io/hd/{tokenID}.png
- Thumbnail Renders –
https://media.artblocks.io/thumb/{tokenID}.png
Please note that these additional static render formats are still currently being back-filled and may not yet be present for all tokens. Our current recommendation for those looking to depend on the "HD" or "thumbnail" responses is to a) first attempt the HD/thumb image resource that you would pefer, b) if this resource is not available, fall back to the standard sized image resource. For the current state of the ongoing backfill of HD and thumbnail assets, please refer to this spreadsheet.
Please also note that the Generator API and Media API links for a given token are included in the token response for that token from the Token API.
Mainnet (Engine)
We are working on a media server for Engine partners. Currently, media is accessible through individual s3 buckets.
Testnet
#
Art Blocks Subgraph
Art Blocks has a GraphQL API Endpoint hosted by The Graph called a subgraph for indexing and organizing data from the Art Blocks smart contracts.
This subgraph can be used to query for on-chain data related to the Art Blocks contracts.
Subgraph information is serviced by a decentralized group of server operators called Indexers.
#
Ethereum Mainnet
- Explorer Page
- Graphql Endpoint: https://api.thegraph.com/subgraphs/name/yyd01245/artblocks
- Code Repo
#
Helpful Resources
- Video Tutorial on creating an API Key
- Managing your API Key & setting your indexer preferences
- Querying from an application
- How to use the explorer and playground to query on-chain data
#
The Art Blocks mainnet subgraph can currently be queried a few ways:
[1] Currently limited to OpenSea & LooksRare
The Art Blocks testnet subgraph can be queried at the URL below:
Recommendation: Using the above links, familiarize yourself with the subgraph’s schema, via the GraphQL playground.