Docs

DCN Public API Documentation

REST API for the Decentralised Creative Network server. This page reflects the current server implementation in dcn-server: connector-centered protocol objects with /connector, /transformation, /condition, and /execute.

Prototype / Pre-MVP Notice

DCN and this API are currently experimental. They are suitable for preview and prototyping, but not yet for production-critical projects. Persistence and behavior guarantees may change between protocol releases until mainnet readiness.

Base URL: https://api.decentralised.art/chain Version: GET /version

Identity & Actor Model

Authentication is wallet-based. Humans and AI agents both authenticate with an EVM address via nonce + signature, then use JWT Bearer tokens on protected endpoints.

{
  "identity_substrate": "evm_address",
  "login_method": "nonce + signature",
  "token": "Authorization: Bearer <access_token>",
  "protected_endpoints": [
    "POST /connector",
    "POST /transformation",
    "POST /condition",
    "POST /execute"
  ]
}

Standard Parameters

Address

  • 0x + 40 hex chars

Pagination

  • limit - integer, max 256
  • page - integer

Entity IDs

  • connector name - string
  • transformation name - string
  • condition name - string

Execution Payload

  • connector_name - string
  • particles_count - uint32 (max 65536)
  • running_instances - array of {start_point, transformation_shift}

Standard Error Shape

Error responses use a common JSON structure:

{
  "message": "string"
}

Common status codes: 400, 401, 404, 500.

Authentication Flow

1) Request nonce, 2) sign message Login nonce: <nonce>, 3) exchange signature for JWT.

GET /nonce/{address}

Returns a one-time nonce for a wallet address.

curl -X GET "https://api.decentralised.art/chain/nonce/0x48f750696ed392ca6d449a3d214656d024c5756f"
{
  "nonce": "589298"
}

POST /auth

Verifies address/signature/message and returns JWT.

curl -X POST "https://api.decentralised.art/chain/auth" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0x48f750696ed392ca6d449a3d214656d024c5756f",
    "message": "Login nonce: 589298",
    "signature": "<hex_signature>"
  }'
{
  "access_token": "<jwt>"
}

The response also includes Authorization: Bearer <jwt> header.

Version

GET /version

curl -X GET "https://api.decentralised.art/chain/version"
{
  "version": "1.2.3",
  "build_timestamp": "2026-03-20T12:00:00Z"
}

Account

GET /account/{address}?limit={limit}&page={page}

Public endpoint. Returns owned connector/transformation/condition names for an address.

curl -X GET "https://api.decentralised.art/chain/account/0x48f750696ed392ca6d449a3d214656d024c5756f?limit=200&page=0"
{
  "owned_connectors": ["c0", "c2", "c3"],
  "owned_transformations": ["add", "identity"],
  "owned_conditions": ["alwaystrue"],
  "address": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "page": 0,
  "limit": 200,
  "total_connectors": 3,
  "total_transformations": 2,
  "total_conditions": 1
}

Connectors

HEAD /connector/{name}[/{address}]

Checks if connector exists.

GET /connector/{name}[/{address}]

Returns newest connector by name, or specific connector when address is provided.

curl -X GET "https://api.decentralised.art/chain/connector/chromatic_scale"
{
  "name": "chromatic_scale",
  "dimensions": [
    {
      "transformations": [{ "name": "add", "args": [1] }],
      "composite": "pitch",
      "bindings": {}
    },
    {
      "transformations": [{ "name": "add", "args": [1] }],
      "composite": "time",
      "bindings": {}
    }
  ],
  "condition_name": "",
  "condition_args": [],
  "owner": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "local_address": "<local_contract_address>",
  "address": "0x0"
}

POST /connector

Protected endpoint. Creates/deploys connector.

curl -X POST "https://api.decentralised.art/chain/connector" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "chromatic_scale",
    "dimensions": [
      {
        "transformations": [{ "name": "add", "args": [1] }],
        "composite": "pitch",
        "bindings": {}
      },
      {
        "transformations": [{ "name": "add", "args": [1] }],
        "composite": "time",
        "bindings": {}
      },
      {
        "transformations": [{ "name": "identity", "args": [] }],
        "composite": "durationv2",
        "bindings": {}
      },
      {
        "transformations": [{ "name": "identity", "args": [] }],
        "composite": "velocity",
        "bindings": {}
      }
    ],
    "condition_name": "",
    "condition_args": []
  }'
{
  "name": "chromatic_scale",
  "owner": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "local_address": "<local_contract_address>",
  "address": "0x0"
}

Connector payload rules

  • dimensions is required and must contain at least one dimension.
  • For each dimension, transformations array is required.
  • bindings map is allowed only when that dimension has non-empty composite.
  • Use the current connector schema only; unsupported/removed fields are rejected by the server.

Transformations

HEAD /transformation/{name}[/{address}]

Checks if transformation exists.

GET /transformation/{name}[/{address}]

curl -X GET "https://api.decentralised.art/chain/transformation/add"
{
  "name": "add",
  "sol_src": "return x + args[0];",
  "owner": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "local_address": "<local_contract_address>",
  "address": "0x0"
}

POST /transformation

curl -X POST "https://api.decentralised.art/chain/transformation" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "add",
    "sol_src": "return x + args[0];"
  }'
{
  "name": "add",
  "owner": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "local_address": "<local_contract_address>",
  "address": "0x0"
}

Conditions

HEAD /condition/{name}[/{address}]

Checks if condition exists.

GET /condition/{name}[/{address}]

curl -X GET "https://api.decentralised.art/chain/condition/alwaystrue"
{
  "name": "alwaystrue",
  "sol_src": "return true;",
  "owner": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "local_address": "<local_contract_address>",
  "address": "0x0"
}

POST /condition

curl -X POST "https://api.decentralised.art/chain/condition" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "alwaystrue",
    "sol_src": "return true;"
  }'
{
  "name": "alwaystrue",
  "owner": "0x48f750696ed392ca6d449a3d214656d024c5756f",
  "local_address": "<local_contract_address>",
  "address": "0x0"
}

Execution

Protected endpoint. Executes connector through runner and returns particle streams.

POST /execute

curl -X POST "https://api.decentralised.art/chain/execute" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "connector_name": "chromatic_scale",
    "particles_count": 16,
    "running_instances": [
      {
        "start_point": 0,
        "transformation_shift": 0
      }
    ]
  }'
[
  { "path": "pitch", "data": [60, 61, 62, 63] },
  { "path": "time", "data": [0, 1, 2, 3] },
  { "path": "durationv2", "data": [1, 1, 1, 1] },
  { "path": "velocity", "data": [100, 100, 100, 100] }
]

Server limit: particles_count <= 65536.

CORS / OPTIONS

The server exposes OPTIONS for auth, account, connector, transformation, condition, and execute endpoints. Typical allowed headers include Authorization, Content-Type.

# examples
OPTIONS /auth
OPTIONS /account/{address}?limit={limit}&page={page}
OPTIONS /connector/{name}[/{address}]
OPTIONS /transformation/{name}[/{address}]
OPTIONS /condition/{name}[/{address}]
OPTIONS /execute

Roadmap

For upcoming API and protocol milestones, see Roadmap.

Current focus: stabilizing connector-centered contracts and improving tooling alignment between dcn-server, SDKs, and this documentation.