CodeForge AICodeForge AI
ProblemsForumPricingDocsBlog
Sign inGet started

Getting Started

  • What is CodeForge AI?
  • Create your account
  • Solve your first problem
  • Using the online compiler

Platform Features

  • Problems, tracks & roadmaps
  • Smart Revision (spaced repetition)
  • Skill analytics & weakness detection
  • Contests & leaderboards
  • Mock interview simulator
  • Community & discussions

AI Tools

  • AI Mentor
  • AI Tools suite
  • AI credits & monthly limits

API & SDKs

  • API overview & authentication
  • Endpoints & examples
  • Rate limits
  • Razorpay webhooks

Guides & Tutorials

  • Tutorial: solve a DSA problem end-to-end
  • Guide: build a study plan
  • Guide: prepare for a company interview

Plans & Billing

  • Plans & pricing
  • Subscriptions & auto-pay
  • Coupon codes
  • Downloading invoices
  • Cancel or delete your account

FAQ

  • Frequently asked questions
DocsAPI & SDKsAPI overview & authentication

API overview & authentication

CodeForge AI ships a REST API under /api. An interactive OpenAPI/Swagger explorer is available at /docs (admin access).

Authentication

Protected endpoints use your session cookie, set after you sign in via NextAuth. Call the API from the same origin (the browser sends the cookie automatically), for example from your own dashboard scripts or the in-app client.

// Same-origin fetch — the session cookie is sent automatically
const res = await fetch("/api/billing/usage");
const data = await res.json();
console.log(data.usage); // { used, allowance, remaining, ... }

Public endpoints (problem listing, search, discussions read) don't require a session. Mutating requests must be same-origin (a CORS guard blocks cross-site writes) and bodies are capped at 1 MB.

NextEndpoints & examples
← All documentation

Still stuck? Contact support