Advanced1 min

API Integration Guide

Detailed API usage for Pro users

API Integration Guide

API guide for Pro (¥1,400/month) users.


🔑 Getting API Key

  1. Log in to Dashboard
  2. Go to "API Keys" section
  3. Click "Generate New Key"
  4. Save key securely

📡 Endpoint

POST https://yamlforge.dev/api/convert

📝 Request Example

YAML → JSON

curl -X POST https://yamlforge.dev/api/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "name: test\nversion: 1.0",
    "inputFormat": "yaml",
    "outputFormat": "json",
    "options": {
      "preserveAnchors": true,
      "preserveComments": true,
      "indentSize": 2
    }
  }'

Response

{
  "success": true,
  "output": "{\n  \"name\": \"test\",\n  \"version\": 1.0\n}",
  "metadata": {}
}

📊 Rate Limits

PlanRequests/hour
Pro1,000

❌ Error Codes

CodeDescription
401Authentication error
400Invalid input
429Rate limit exceeded
Tags
#api#integration#pro#advanced#developer