API Documentation

Available Endpoints

1. Get Racer Data (JSON)

GET /api/racer/[slug]

Description

Returns JSON data about a NitroType racer, including their stats, display name, speed records, and account information.

Parameters

  • username (required) - The NitroType username to look up

Example Request

GET https://nitrotype-api.vercel.app/api/racer/

Changes auto-fetch after 5 seconds

2. Generate Stats Image

GET /api/racer/[slug]/gen-image

Description

Generates and returns a PNG image displaying the racer's stats in a visually appealing format. Perfect for embedding in GitHub READMEs or sharing on social media.

Parameters

  • slug (required) - The NitroType username in the URL path
  • w (optional) - Image width in pixels (default: 800)
  • h (optional) - Image height in pixels (default: 400)
  • font-size (optional) - Primary font size in pixels (default: 60)
  • text-color (optional) - Main text color in rgba format (default: rgba(255,255,255,1))
  • accent-color (optional) - Accent color for stats in rgba format (default: rgba(255,150,150,1))
  • secondary-text-color (optional) - Dimmed text color in rgba format (default: rgba(255,255,255,0.5))
  • link-color (optional) - Link text color in rgba format (default: rgba(255,0,255,0.5))
  • stroke-color (optional) - Text outline color in rgba format (default: rgba(0,0,0,0.3))
  • bg-color (optional) - Background color in rgba format (default: rgba(0,0,0,1))
  • gradient-color (optional) - Gradient center color in rgba format (default: rgba(100,0,255,1))
  • gradient-size (optional) - Radial gradient radius in pixels (default: 200)

Example Request

GET https://nitrotype-api.vercel.app/api/racer//gen-image?w=&h=&font-size=&text-color=&accent-color=&secondary-text-color=&link-color=&stroke-color=&bg-color=&gradient-color=&gradient-size=

Response

Returns a PNG image with the racer's stats

Usage in Markdown

[![NitroType Stats](https://nitrotype-api.vercel.app/api/racer/bigmoemoney/gen-image)](https://nitrotype-api.vercel.app)

Custom Colors Example

GET /api/racer/bigmoemoney/gen-image?text-color=rgba(255,255,0,1)&accent-color=rgba(0,255,0,1)

Notes

  • All endpoints are rate-limited to prevent abuse
  • Data is fetched live from NitroType.com
  • Images are generated on-demand (not cached)
  • Garage, loot, and cars data are excluded from JSON responses

Error Responses

If a username doesn't exist or an error occurs:

  • JSON endpoint: Returns { "error": "Try a different username." } with status 500
  • Image endpoint: Returns error message as plain text with status 500

Live JSON Response

Enter a username to see results

Live Image Response

bigmoemoney's stats