REST API RESTful

Direct HTTP access to all WebburnsTech AI capabilities

Base URL & Authentication

All API requests should be made to the base URL below. Authentication is required via Bearer token.

Base URL
https://api.webburnstech.dev/v1
Authentication

Include your API key in the Authorization header as a Bearer token. Get your API key from the WebburnsTech Dashboard.

Authentication Header
Authorization: Bearer wbt_your_api_key_here

Quick Start

Make your first API call to analyze text sentiment using cURL or any HTTP client.

Terminal
curl -X POST https://api.webburnstech.dev/v1/nlp/sentiment \
  -H "Authorization: Bearer wbt_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "WebburnsTech makes AI integration incredibly simple!",
    "language": "en"
  }'
JavaScript
const response = await fetch('https://api.webburnstech.dev/v1/nlp/sentiment', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer wbt_your_api_key_here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    text: 'WebburnsTech makes AI integration incredibly simple!',
    language: 'en'
  })
});

const data = await response.json();
console.log(data);
Python
import requests

url = 'https://api.webburnstech.dev/v1/nlp/sentiment'
headers = {
    'Authorization': 'Bearer wbt_your_api_key_here',
    'Content-Type': 'application/json'
}
data = {
    'text': 'WebburnsTech makes AI integration incredibly simple!',
    'language': 'en'
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
Response
{
  "sentiment": "positive",
  "confidence": 0.95,
  "emotions": {
    "joy": 0.85,
    "trust": 0.78,
    "anticipation": 0.64
  },
  "language": "en",
  "request_id": "req_123456789"
}

API Endpoints

Complete reference of all available REST API endpoints organized by service.

Natural Language Processing

POST /nlp/sentiment

Analyze sentiment and emotions in text.

Request Body

Parameter Type Required Description
text string Yes Text to analyze for sentiment
language string No Language code (auto-detected if not provided)
detailed boolean No Return detailed emotion analysis

Response

200 - Success
{
  "sentiment": "positive",
  "confidence": 0.95,
  "emotions": {
    "joy": 0.85,
    "trust": 0.78
  },
  "language": "en",
  "request_id": "req_123456789"
}
POST /nlp/entities

Extract named entities from text.

Request Body

Parameter Type Required Description
text string Yes Text to extract entities from
types array No Filter by entity types (PERSON, ORGANIZATION, etc.)

Computer Vision

POST /vision/analyze

Analyze images for objects, faces, text, and colors.

Request Body

Parameter Type Required Description
image string Yes Image URL or base64 encoded image data
features array No Specific features to analyze (objects, faces, text, colors)
Example Request
{
  "image": "https://example.com/image.jpg",
  "features": ["objects", "faces", "text"]
}

Chat & Conversations

POST /chat/conversations New

Create a new conversation.

POST /chat/conversations/{id}/messages

Send a message in an existing conversation.

Request & Response Format

Understand the standard request and response formats used across all endpoints.

Request Headers

Standard headers for all API requests.

Header Required Description
Authorization Yes Bearer token with your API key
Content-Type Yes application/json for JSON payloads
User-Agent No Identify your application
X-Request-ID No Unique ID for request tracking

Response Format

Standard response structure for successful requests.

{
  "data": {
    // Endpoint-specific data
  },
  "meta": {
    "request_id": "req_123456789",
    "timestamp": "2025-12-07T10:30:00Z",
    "version": "v1"
  }
}

Error Response Format

Standard error response structure.

{
  "error": {
    "code": "invalid_api_key",
    "message": "The provided API key is invalid",
    "details": {
      // Additional error context
    },
    "request_id": "req_123456789",
    "documentation_url": "https://docs.webburnstech.dev/errors/invalid_api_key"
  }
}

Error Handling

Common error codes and how to handle them in your application.

Authentication Errors

401 Invalid API key

403 Insufficient permissions

Rate Limiting

429 Too many requests

Check Retry-After header for wait time

Client Errors

400 Invalid request

404 Resource not found

Error Response Example
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Please try again in 60 seconds.",
    "details": {
      "limit": 1000,
      "remaining": 0,
      "reset_time": "2025-12-07T10:31:00Z"
    },
    "request_id": "req_123456789",
    "documentation_url": "https://docs.webburnstech.dev/errors/rate_limit_exceeded"
  }
}

Rate Limiting

Understand rate limits and how to handle them effectively.

Rate Limit Headers

Rate limit information is included in response headers.

Header Description
X-RateLimit-Limit Total requests allowed per window
X-RateLimit-Remaining Remaining requests in current window
X-RateLimit-Reset Unix timestamp when limits reset
Retry-After Seconds to wait after hitting limit (429 responses)
Default Limits

Free tier: 1,000 requests per hour • Pro tier: 10,000 requests per hour • Enterprise: Custom limits

Best Practices

Follow these best practices for optimal API usage and performance.

Use HTTPS

Always use HTTPS for all API requests to ensure data security and encryption.

Handle Errors Gracefully

Implement proper error handling for network issues, rate limits, and API errors.

Use Request IDs

Include unique request IDs for better debugging and support.

Implement Retry Logic

Retry failed requests with exponential backoff for transient errors.

Monitor Usage

Track your API usage and set up alerts for approaching limits.

Cache Responses

Cache responses when appropriate to reduce API calls and improve performance.

API Status & Versioning

Information about API stability, versioning, and status monitoring.

Versioning

The API uses URL versioning (e.g., /v1/). Breaking changes will result in a new version.

Version Header
Accept: application/vnd.webburnstech.v1+json

Status Monitoring

Check API status and subscribe to updates.

Status Endpoint
GET https://status.webburnstech.dev/api/v1/status
Need Help?

Check our FAQ for common questions or join our community forum for support. For API issues, include the request_id from error responses.