Profile Card

This endpoint enables the creation of a PNG image profile (card) for any Discord user. It is particularly useful for welcoming new members to your server.

Endpoint

  • URL: https://api.erensko.xyz/v1/profile-image

  • Method: POST

  • Description: Generates a profile (card) image for any Discord user.

URL Parameters

Key
Value

userId (required)

The Discord user ID to create an image for.

Request Body

Key
Value

customUsername

Customize the username of the user

customTag

Custom text below the user

customSubtitle

Custom text below the custom tag

customBadges

Array of your own PNG badges to display in the top right of the profile image (Media URLs).

customBackground

The background of the image (Media URL). If a background is not provided, the user's banner will be used.

badgesFrame

Creates a small frame behind the badges, set this t true or false.

overwriteBadges

Merge your customBadges with the discord defaults, set this to true or false.

removeBadges

Removes badges from the image, whether custom or from discord, set to true or false.

removeBorder

Removes the border around the image, set to true or false.

usernameColor

The HEX color for the username of the image.

tagColor

The HEX color for the tag of the image.

borderColor

The HEX color for the border of the image.

squareAvatar

Changes the avatar shape of the provided user to a square, set this to true or false.

backgroundBrightness

Set the brightness of the background from a number value between 1 and 100.

removeAvatarFrame

Remove the discord avatar frame/decoration (if any) from the profile, set to true or false.

customDate

Custom date or text to use instead of when the user joined Discord in the bottom right corner.

rankData

An object useful for leveling/ranking server systems with XP, check this for more details.

presenceStatus

The status to be displayed bottom-right of the avatar. (offline, online, idle, dnd)

moreBackgroundBlur

Will add a large amount of blur to the background, set to true or false.

localDateType

Date format locale, 'en' , 'es', etc for the time in the bottom-right of the image.

disableProfileTheme

Disables the discord profile theme colors, true or false.

Level Ranking (XP)

Optionally, you can set up a complete object (rankData) that includes all the necessary fields for a rank and leveling system. This is useful for displaying and managing user ranks, levels, and related data. All of the fields below are required. View an example object below.

{
  "rankData": {
    "currentXp": 1500,
    "requiredXp": 2000,
    "level": 5,
    "rank": 42,
    "barColor": "#4CAF50",
    "levelColor": "#FFD700",
    "autoColorRank": true
  }
}
Key

currentXp

The current XP of the user (number)

requiredXp

The required XP of the user until they reach the next level in your system. (number)

level

The current level of the user (number)

rank

The current rank of the user (number). Will be displayed as #1, #18, etc.

barColor

Hex color code of the leveling bar (string)

levelColor

HHex color codeof the user (string)

autoColorRank

1st, 2nd, and 3rd get colorized ranking text, set this to true in order to enable this.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here. This is completely required.

Request Example

POST https://api.erensko.xyz/v1/profile-image

Response Example

{
  "success": true,
  "message": "Image Created",
  "options": {
    "customUsername": "ErenskoV1",
    "tagColor": "#C70039",
    "squareAvatar": true,
    "backgroundBrightness": 95,
    "rankData": {
      "currentXp": 1500,
      "requiredXp": 2000,
      "level": 5,
      "rank": 42,
      "barColor": "#4CAF50",
      "levelColor": "#FFD700",
      "autoColorRank": true
    }
  },
  "url": "https://api.erensko.xyz/media/7efdd7ef-7fa0-4f7b-b204-de6fdc97fc27.png"
}

Last updated