Midas Code API is now in public beta. Get started free

PricingDocs
Documentation

Documentation

Everything you need to integrate Midas Code into your workflow.

Getting Started

Get up and running

From zero to your first code generation in under five minutes.

1

Create your account

Sign up for a free Midas Code account. No credit card required to get started.

Sign up free
2

Get your API key

After signing in, navigate to your dashboard and generate an API key from the API Keys section.

Go to dashboard
3

Make your first request

Use the key in the Authorization header of a POST request to /api/agent/prompt. See the example below.

4

Explore the tools

Try the Context Engine, Agents API, and SDK integrations to unlock the full Midas Code platform.

Explore tools

Quick example

Make your first API call in under 60 seconds.

Request

curl -X POST https://api.midascode.net/api/agent/prompt \
  -H "Authorization: Bearer midas_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "midas-2",
    "prompt": "Create a rate-limited Express.js middleware",
    "language": "typescript",
    "context": ""
  }'

Response

{
  "id": "gen_01jxk8m2s4f9r",
  "model": "midas-2",
  "language": "typescript",
  "code": "import rateLimit from 'express-rate-limit';\n\nexport const rateLimiter = rateLimit({\n  windowMs: 15 * 60 * 1000,\n  max: 100,\n  message: { error: 'Too many requests' },\n});",
  "tokens": 87,
  "latency_ms": 620
}
API Reference

API Reference

All available endpoints. Authenticate requests using Authorization: Bearer midas_your_key.

POST/api/auth/send-codeSend a one-time login code to an email address.
POST/api/auth/verifyVerify the OTP and issue a session token.
GET/api/user/meReturn the authenticated user's profile and credits.
POST/api/agent/promptSubmit a code generation prompt and receive a response.
GET/api/agent/sessionsList all agent sessions for the current user.
GET/api/credits/packagesReturn available credit packages and their prices.
POST/api/credits/purchaseInitiate a credit purchase for the current user.
POST/api/token-gate/checkCheck whether a wallet holds a required token.
GET/api/usage/statsReturn aggregated usage statistics for the current user.
SDKs

Official SDKs

Client libraries with full TypeScript types, retry logic, and streaming support out of the box.