API Reference

Complete reference for all WhizAI API endpoints.

Base URL

https://api.whizur.com/v1

For local development: http://localhost:3000/v1

Authentication

All API requests require authentication using an API key. Include it in the request header:

Header format:

X-API-Key: cw_development_YOUR_KEY_HERE

Or use Bearer token format:

Authorization: Bearer cw_development_YOUR_KEY_HERE

Learn more about API keys and security →

Response Format

Success responses:

{
  "id": "response_id",
  "object": "response_type",
  "created": 1234567890,
  // ... response data
}

Error responses:

{
  "error": {
    "message": "Error description",
    "code": "ERROR_CODE",
    "status": 400,
    "timestamp": "2024-01-01T00:00:00Z"
  }
}

Endpoints

Generation

POST /v1/generate/text

Generate text content

POST /v1/generate/image

Generate images (async workflow)

POST /v1/generate/image/edit

Edit images (async workflow)

Supported models: dall-e-3 (default), dall-e-2, stable-diffusion-xl

GET /v1/generate/models

List available models

Learn more →

Recommendations

POST /v1/recommend/similar

Get similar items

POST /v1/recommend/feed

Get personalized feed

POST /v1/recommend/trends

Get trend detection

Learn more →

Moderation

POST /v1/moderate/content

Moderate text content

POST /v1/moderate/image

Moderate images

POST /v1/moderate/batch

Batch moderation

Learn more →

Enrichment

POST /v1/enrich/text

Enrich text content

POST /v1/enrich/image

Enrich images

POST /v1/enrich/batch

Batch enrichment

Learn more →

Workflows

POST /v1/workflows/run

Start a workflow run

GET /v1/workflows/runs/:runId

Get workflow run status

Learn more →

Usage

GET /v1/usage/metrics

Get usage metrics

Learn more →

Rate Limits

API requests are rate limited per API key. Rate limits vary by endpoint type:

  • AI endpoints (generation, enrichment): Higher limits
  • General endpoints: Standard limits
  • Rate limit headers are included in responses

Error Codes

CodeHTTP StatusDescription
VALIDATION_ERROR400Invalid request parameters
UNAUTHORIZED401Invalid or missing API key
NOT_FOUND404Resource not found
RATE_LIMIT_EXCEEDED429Rate limit exceeded
INTERNAL_ERROR500Internal server error

Need More Details?