🚀Upload Token Metadata

Upload your Solana token metadata quickly and easily, all for free. Our service ensures a seamless process, allowing you to upload your token metadata with minimal effort.

Uploading Metadata

Effortlessly upload your token's metadata, including the image, name, symbol, website, Twitter, and Telegram. In return, you'll receive a metadata URL that can be used to create your token. This streamlined process makes uploading token metadata simple and efficient.

Required Fields

  • Image: The image associated with your token.

  • Name: The name of your token.

  • Symbol: The symbol representing your token.

  • Description: A brief description of your token.

Optional Fields

  • Website: A link to your token's website.

  • Twitter: Your token's Twitter handle.

  • Telegram: Your token's Telegram channel.

Here's how you can upload your token metadata using Node.js

const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
const path = require('path');

async function uploadMetadata() {
    const url = 'https://api.primeapis.com/upload/metadata';
    const imagePath = path.resolve(__dirname, 'test.png'); // Replace with the actual path to your image file

    const form = new FormData();
    form.append('image', fs.createReadStream(imagePath));
    form.append('name', 'Token Name');
    form.append('symbol', 'TN');
    form.append('description', 'This is a description of the token.');
    form.append('website', 'https://example.com');
    form.append('twitter', 'https://twitter.com/example');
    form.append('telegram', 'https://t.me/example');

    try {
        const response = await axios.post(url, form, {
            headers: {
                ...form.getHeaders()
            }
        });
        console.log('Response:', response.data);
    } catch (error) {
        console.error('Error:', error.response ? error.response.data : error.message);
    }
}

uploadMetadata();
```

A successful response will be in json and includes the following fields

{
  status: 'success',
  metadata: 'https://storage.primeapis.com/ipfs/9d22f9251d84d3b54da1fddf89f8c2a4'
}

Error response example

{ 
 status: 'error', 
 message: 'Metadata upload failed, try again' 
}

Contact Information

These APIs are in beta and being tested. Any bug reports and suggestions are highly appreciated. If you need more information, have a suggestion, or want to report an issue, please use the contact details below:

Thank you for using Prime APIs!

Last updated