Skip to main content
POST
/
moment
/
create-batch
Create Moments Batch
curl --request POST \
  --url https://api.inprocess.world/api/moment/create-batch \
  --header 'Content-Type: application/json' \
  --data '
{
  "contract": {
    "address": "<string>",
    "name": "<string>",
    "uri": "<string>"
  },
  "tokens": [
    {
      "tokenMetadataURI": "<string>",
      "createReferral": "<string>",
      "salesConfig": {
        "pricePerToken": "<string>",
        "saleStart": "<string>",
        "saleEnd": "<string>",
        "currency": "<string>"
      },
      "mintToCreatorCount": 123,
      "payoutRecipient": "<string>",
      "maxSupply": 2
    }
  ],
  "account": "<string>",
  "splits": [
    {
      "address": "<string>",
      "percentAllocation": 50
    }
  ],
  "chainId": 8453
}
'
import requests

url = "https://api.inprocess.world/api/moment/create-batch"

payload = {
"contract": {
"address": "<string>",
"name": "<string>",
"uri": "<string>"
},
"tokens": [
{
"tokenMetadataURI": "<string>",
"createReferral": "<string>",
"salesConfig": {
"pricePerToken": "<string>",
"saleStart": "<string>",
"saleEnd": "<string>",
"currency": "<string>"
},
"mintToCreatorCount": 123,
"payoutRecipient": "<string>",
"maxSupply": 2
}
],
"account": "<string>",
"splits": [
{
"address": "<string>",
"percentAllocation": 50
}
],
"chainId": 8453
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
contract: {address: '<string>', name: '<string>', uri: '<string>'},
tokens: [
{
tokenMetadataURI: '<string>',
createReferral: '<string>',
salesConfig: {
pricePerToken: '<string>',
saleStart: '<string>',
saleEnd: '<string>',
currency: '<string>'
},
mintToCreatorCount: 123,
payoutRecipient: '<string>',
maxSupply: 2
}
],
account: '<string>',
splits: [{address: '<string>', percentAllocation: 50}],
chainId: 8453
})
};

fetch('https://api.inprocess.world/api/moment/create-batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.inprocess.world/api/moment/create-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contract' => [
'address' => '<string>',
'name' => '<string>',
'uri' => '<string>'
],
'tokens' => [
[
'tokenMetadataURI' => '<string>',
'createReferral' => '<string>',
'salesConfig' => [
'pricePerToken' => '<string>',
'saleStart' => '<string>',
'saleEnd' => '<string>',
'currency' => '<string>'
],
'mintToCreatorCount' => 123,
'payoutRecipient' => '<string>',
'maxSupply' => 2
]
],
'account' => '<string>',
'splits' => [
[
'address' => '<string>',
'percentAllocation' => 50
]
],
'chainId' => 8453
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.inprocess.world/api/moment/create-batch"

payload := strings.NewReader("{\n \"contract\": {\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"uri\": \"<string>\"\n },\n \"tokens\": [\n {\n \"tokenMetadataURI\": \"<string>\",\n \"createReferral\": \"<string>\",\n \"salesConfig\": {\n \"pricePerToken\": \"<string>\",\n \"saleStart\": \"<string>\",\n \"saleEnd\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"mintToCreatorCount\": 123,\n \"payoutRecipient\": \"<string>\",\n \"maxSupply\": 2\n }\n ],\n \"account\": \"<string>\",\n \"splits\": [\n {\n \"address\": \"<string>\",\n \"percentAllocation\": 50\n }\n ],\n \"chainId\": 8453\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.inprocess.world/api/moment/create-batch")
.header("Content-Type", "application/json")
.body("{\n \"contract\": {\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"uri\": \"<string>\"\n },\n \"tokens\": [\n {\n \"tokenMetadataURI\": \"<string>\",\n \"createReferral\": \"<string>\",\n \"salesConfig\": {\n \"pricePerToken\": \"<string>\",\n \"saleStart\": \"<string>\",\n \"saleEnd\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"mintToCreatorCount\": 123,\n \"payoutRecipient\": \"<string>\",\n \"maxSupply\": 2\n }\n ],\n \"account\": \"<string>\",\n \"splits\": [\n {\n \"address\": \"<string>\",\n \"percentAllocation\": 50\n }\n ],\n \"chainId\": 8453\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.inprocess.world/api/moment/create-batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"contract\": {\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"uri\": \"<string>\"\n },\n \"tokens\": [\n {\n \"tokenMetadataURI\": \"<string>\",\n \"createReferral\": \"<string>\",\n \"salesConfig\": {\n \"pricePerToken\": \"<string>\",\n \"saleStart\": \"<string>\",\n \"saleEnd\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"mintToCreatorCount\": 123,\n \"payoutRecipient\": \"<string>\",\n \"maxSupply\": 2\n }\n ],\n \"account\": \"<string>\",\n \"splits\": [\n {\n \"address\": \"<string>\",\n \"percentAllocation\": 50\n }\n ],\n \"chainId\": 8453\n}"

response = http.request(request)
puts response.read_body
{
  "contractAddress": "0xfd5b6abaeb35d5d14ebad9c047c2947de938791e",
  "hash": "0x49a71e96b5234eb15127c7de6446663fea1c13b91d18b5538108888ffca385cd",
  "chainId": 8453,
  "tokenIds": [
    "4",
    "5"
  ]
}
{
"status": "error",
"message": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}
{
"status": "error",
"message": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}

Body

application/json
contract
object
required

Collection target. Provide address to mint on an existing ERC-1155 collection, or provide both name and uri to deploy a new collection in the same request.

tokens
object[]
required

Tokens to create. Tokens are created in order and returned as tokenIds in the same order.

Minimum array length: 1
account
string
required

Creator's address

splits
object[]

Optional revenue splits configuration. Must have at least 2 recipients and sum to 100%

Minimum array length: 2
chainId
integer
default:8453

Chain ID (optional; defaults to Base mainnet in production and Base Sepolia in preview or development)

Response

Successful response

contractAddress
string
required

The existing collection address

hash
string
required

Transaction hash of the batch creation operation

chainId
integer
required

Chain ID where the transaction was executed

tokenIds
string[]
required

Token IDs created by the batch transaction, returned in the same order as the request tokens