Discord API
Ten REST endpoints for Discord bot and app developers: calculators, builders, decoders, and moderation. One API key, pay-per-use credits, no SDK lock-in.
Discord Bot Tools
1 credit per call. Click any tool to run it live.
Permissions Calculator
Convert a Discord permissions bitfield to its permission names, or names back to the combined 64-bit bitfield. Flags ADMINISTRATOR.
/tools/discord-permissions-calcTimestamp Generator
Generate Discord dynamic timestamp markup (<t:unix:style>) that renders in each viewer's local timezone. Returns every style.
/tools/discord-timestampGateway Intents Calculator
Calculate the Gateway intents bitfield from intent names, or decode a value to names. Flags the privileged intents.
/tools/discord-intents-calcBot Invite URL Builder
Build a Discord OAuth2 bot-invite / authorization URL from a client ID, with optional permissions, scopes, and pre-selected guild.
/tools/discord-bot-inviteSnowflake Decoder
Decode a Discord snowflake ID into its creation timestamp plus the internal worker, process, and increment values.
/tools/discord-snowflake-decodeCDN URL Resolver
Build and validate Discord CDN asset URLs: avatars, icons, banners, emojis, stickers, and default avatars. Auto-detects animated assets.
/tools/discord-cdn-resolveDiscord Messaging & Safety
1-3 credits per call. Click any tool to run it live.
Embed Builder
Validate and normalize Discord embeds against every limit (title, description, 25 fields, 6000 chars, 10 embeds). Returns a ready-to-send payload.
/tools/discord-embed-buildSlash Command Validator
Validate a slash/application-command definition against all Discord rules: name format, description lengths, option types, choices, nesting, and the 4000-character budget.
/tools/discord-command-validateText Sanitizer
Make untrusted text safe to echo in a message: neutralize @everyone/@here and raw mentions, escape markdown, and strip invisible/bidi/control characters.
/tools/discord-text-sanitizeMessage Moderation
AutoMod-style moderation for a message: invite links, mass mentions, caps, emoji/char spam, zalgo, and scam phrases. Returns a risk score and recommended action.
/tools/discord-moderateHow it fits with the official Discord API
Use both. Discord handles the live connection; Mecanik handles the supporting logic around it.
Official Discord API
- Gateway connection, events, and live bot actions
- Sending messages, managing guilds and members
- Requires your bot token and a maintained connection
Mecanik Discord API
- Stateless calculators, builders, and validators
- Sanitizes and moderates untrusted text before you post it
- No bot token, no gateway, one HTTP request per call
Why build on the Mecanik Discord API
No Gateway Connection
Stateless REST calls run at the edge. No bot login, no rate-limit juggling against Discord's gateway.
Always Up to Date
Permission flags, intents, and CDN rules tracked against the latest Discord changes so your bot never drifts.
Structured JSON
Consistent { result, success, errors } format. Easy to parse in discord.js, discord.py, or any language.
Safe by Design
Sanitizer and moderation tools operate only on supplied text. No Discord API contact, no token sharing required.
Pay Per Use
Most Discord tools cost 1 credit. No subscriptions, no per-seat fees, no minimums.
Credits Never Expire
Buy once, use at your own pace. Ideal for hobby bots and weekend projects.
What is the Mecanik Discord API?
The Discord API from Mecanik is a set of ten REST endpoints that handle the fiddly, error-prone parts of building a Discord bot or app, so you don’t have to reimplement them yourself. Instead of hardcoding permission bitfields, hand-rolling <t:unix> timestamp markup, or writing your own AutoMod heuristics, you make one authenticated POST request and get back clean, structured JSON.
Every endpoint is stateless and runs on Cloudflare Workers at the edge, so there is no gateway connection to maintain and no cold starts. The tools fall into two groups. The builders and calculators include the Discord permissions calculator , the Discord timestamp generator , gateway intents, bot-invite URLs, snowflake decoding, CDN URLs, embeds, and slash-command validation. The safety tools (text sanitizer and message moderation) make untrusted user input safe to echo back into a channel.
Frequently Asked Questions
Is this the official Discord API?
No. This is a third-party developer toolkit that complements Discord’s official API. It performs calculations, validation, and formatting locally, and never connects to Discord on your behalf or requires your bot token. Use the official Discord API for gateway and REST actions, and the Mecanik Discord API for the supporting logic around them.
Which Discord libraries does it work with?
Any of them. Because every endpoint returns plain JSON, the results drop straight into discord.js, discord.py, Serenity, JDA, or a raw webhook call. There is no SDK lock-in, and a single HTTP request is all you need.
How much does the Discord API cost?
Most Discord tools cost just 1 credit per call; the text sanitizer and slash-command validator cost 2, and message moderation costs 3. Every new account gets 100 free credits, and credit packs start at $5. Credits never expire and there is no subscription.
Do I need to share my bot token?
No. None of these endpoints require your Discord bot token or make authenticated calls to Discord. The sanitizer and moderation tools operate purely on the text you send them, which keeps your bot’s credentials out of the loop entirely.
Can I use the Discord API in production bots?
Yes. The endpoints are stateless, fast, and designed to run on every message or interaction. The moderation and sanitizer tools in particular are built to run at runtime on untrusted user input before your bot echoes or stores it.
Start Building Your Discord Bot
Create a free account, grab your API token, and make your first Discord API call in under a minute.
Get Started FreeBy using the Mecanik API you agree to our API Terms & Acceptable Use Policy and Privacy Policy.