Studio99
Studio99 API documentation

API Documentation

Everything you need to integrate calligraphy generation, library search, and font access into your product.

Base URL: https://studio99.app/api/v1

All endpoints require authentication via API key, except /health.

Authentication

Include your API key in every request using the X-API-Key header:

curl https://studio99.app/api/v1/fonts \
  -H "X-API-Key: your_api_key"

Get your API key from the SSO Dashboard. Keep it secret — don't expose it in client-side code.

POST/api/v1/generate

Generate calligraphy text. Searches the library first, then generates new results.

Request Body

FieldTypeRequiredDescription
textstringYesThe text to generate calligraphy for
languagestringNoLanguage hint: "hindi", "marathi", "gujarati". Auto-detected if omitted.
stylestringNo"calligraphy", "decorative", "publication"
fontIdstringNoSpecific font ID. Auto-selects if omitted.
countnumberNoNumber of results (default: 4, max varies by plan)
formatstringNo"svg" (default) or "png"
curl -X POST https://studio99.app/api/v1/generate \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "शुभ विवाह",
    "language": "hindi",
    "count": 4,
    "format": "svg"
  }'

Response

{
  "success": true,
  "data": {
    "libraryResults": [
      {
        "id": "art_abc123",
        "displayName": "शुभ विवाह",
        "thumbnailUrl": "https://...",
        "source": "library",
        "category": { "name": "Wedding", "slug": "wedding" }
      }
    ],
    "generatedResults": [
      {
        "id": "gen_xyz789",
        "fontId": "font-uuid",
        "fontFamily": "Calligraphy Pro",
        "resultText": "...",
        "source": "generated",
        "svg": {
          "path": "M10 20 C30 40...",
          "width": 800,
          "height": 200,
          "svgString": "<svg>...</svg>"
        }
      }
    ],
    "metadata": {
      "fontSelection": { "wasAutoSelected": true, "detectedLanguage": "hindi" },
      "processingTimeMs": 245
    }
  },
  "usage": { "monthlyUsed": 42, "monthlyLimit": 5000, "remaining": 4958 }
}
GET/api/v1/library/{id}

Get full details of a single artwork by ID, shortId, or slug.

curl "https://studio99.app/api/v1/library/art_abc123" \
  -H "X-API-Key: your_api_key"
GET/api/v1/fonts

List all available fonts with metadata. Font files are never exposed.

curl "https://studio99.app/api/v1/fonts" \
  -H "X-API-Key: your_api_key"

Response

{
  "success": true,
  "data": {
    "fonts": [
      {
        "id": "font-uuid",
        "name": "Calligraphy Pro",
        "slug": "calligraphy-pro",
        "family": "CalligraphyPro",
        "languages": ["Hindi", "Marathi"],
        "style": "CALLIGRAPHY",
        "weight": "REGULAR",
        "categories": ["wedding", "festival"]
      }
    ]
  }
}

Error Codes

All errors return a standard format:

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Monthly API call limit of 100 exceeded."
  }
}
CodeHTTPDescription
AUTHENTICATION_REQUIRED401Missing or invalid API key
RATE_LIMIT_EXCEEDED429Monthly quota or burst limit exceeded
INVALID_INPUT400Bad request body or parameters
TEXT_TOO_LONG400Exceeds tier's max text length
FONT_NOT_FOUND404Invalid fontId or artwork not found
GENERATION_FAILED500Internal generation error

Rate Limits

Rate limits are applied per API key at two levels:

  • Burst limit: Requests per minute (varies by plan: 5-120 req/min)
  • Monthly limit: Total API calls per billing month (varies by plan: 100-unlimited)

Rate limit info is included in response headers:

X-RateLimit-Limit: 20          # Max requests per minute
X-RateLimit-Remaining: 18     # Remaining in current window
X-RateLimit-Reset: 1704067200  # Window reset time (Unix)

When rate-limited, the API returns HTTP 429 with a RATE_LIMIT_EXCEEDED error. Implement exponential backoff in your client.

Need help? Contact us or check the pricing page.