API

Overview

This API is designed to dynamically generate parameters for ERC20 tokens, including token names, supply amounts, symbols, and images leveraging OpenAI's language models. It aims to assist developers and creators in the cryptocurrency space by automating the creative process of defining token characteristics.

Features

  • Token Name Generation: Creates unique and creative token names based on user input, avoiding generic terms and ensuring names are within a 60-character limit.

  • Token Supply Calculation: Generates a numerical value for the token's supply, encouraging creativity while adhering to typical supply range constraints.

  • Token Symbol Creation: Develops concise and relevant token symbols derived from the generated or provided token name.

  • Image Generation: Generates an image based on the name suggested by the LLM.

  • Token Deployment: Creates the transaction data that allows developers to deploy their token.

Endpoints

POST /api/v1/generate

Generates ERC20 token parameters based on the input provided, then deploys it to the network of choice.

Request Body

  • name: The base or suggested name for the token. To use an exact name without modification, prefix with "exact:".

  • supply: A suggestion or base value for calculating the token's supply.

  • symbol: A suggestion for the token symbol. For exact usage, prefix with "exact:".

  • temperature: Controls the creativity of the responses. Higher values lead to more varied outputs.

  • model: determines the model to be used with the associated request, including GPT-3.5, GPT-4, or BitTensor

  • chain: the blockchain network to be used for deployment of the generated token

We currently support the following chains:

  • Ethereum

  • Sepolia

  • Base

  • BNB Smart Chain

  • Polygon

  • OP Mainnet

  • Arbitrum One

  • Avalanche

Response

  • 200 OK: Returns a JSON object with name, supply, symbol, image, and transactionData fields, each containing relevant values.

  • 403 Forbidden: Returned if the API key is not authorized.

  • 405 Method Not Allowed: Returned if the request method is not POST.

  • 429 Too Many Requests: Returned if the rate limit is exceeded.

  • 500 Internal Server Error: Returned if there is an error during the generation process.

Usage

Request: Send a POST request to the endpoint with the desired parameters in the body.

Rate Limiting: In development mode, rate limiting is enforced based on the API key to prevent abuse. Rate limit is currently 5 calls per minute. Contact us if you need more calls per minute

Examples

Generate Metadata + Deploy Token

Request

POST /api/v1/generate
Content-Type: application/json

{
  "name": "exact:MyToken",
  "supply": "1M",
  "symbol": "MTK",
  "temperature": "0.7",
  "chain": "Sepolia",
  "model": "GPT-3.5",
}

Response

{
  "name": "MyToken",
  "supply": "1000000",
  "symbol": "MTK",
  "image": "http://image.com/",
  "transactionData": {}
}

Deploy using ethers.js

const { data: { transactionData } } = await axios.post(`https://aiis.dev/api/v1/generate`, { 
    chain: "Sepolia",
    name: "MyToken",
    supply: 1000000,
    symbol: "MTK",
    image: "http://image.com/",
    model: "GPT-3.5"
  })

const tx = await signer.sendTransaction(transaction);
const receipt = await tx.wait();

To request for API access, please fill out the form here: https://pdt2xp4pkg3.typeform.com/to/bWz32p4f

Last updated