AI Model API Documentation

Access cutting-edge artificial intelligence capabilities including natural language processing, computer vision, predictive analytics, and machine learning models.

Overview

The Webburns Tech AI Model API provides access to a suite of powerful artificial intelligence models for various tasks including natural language processing, computer vision, translation, and speech processing.

Base URL: https://api.webburnstech.com/ai/v1/

Current Version: v1.2.3

Format: All requests and responses are in JSON format.

Getting Started

To start using the AI Model API, you'll need an API key. You can obtain one from the API Keys page.

All API requests must include your API key in the request header:

Authorization: Bearer YOUR_API_KEY

Authentication

All API requests require authentication using an API key. Your API key should be included in the Authorization header of every request.

POST /auth/validate

Validate your API key and get information about your account and usage limits.

Request Parameters

Parameter Type Required Description
api_key string Yes Your API key

Code Examples

curl -X POST "https://api.webburnstech.com/ai/v1/auth/validate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
import requests

url = "https://api.webburnstech.com/ai/v1/auth/validate"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)
print(response.json())
const fetch = require('node-fetch');

const url = 'https://api.webburnstech.com/ai/v1/auth/validate';
const headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
};

fetch(url, {
    method: 'POST',
    headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const url = 'https://api.webburnstech.com/ai/v1/auth/validate';
const headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
};

fetch(url, {
    method: 'POST',
    headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Response Example

{
  "valid": true,
  "account": {
    "id": "acc_123456",
    "name": "John Doe",
    "plan": "pro",
    "remaining_requests": 4950,
    "reset_date": "2023-12-01T00:00:00Z"
  }
}

Rate Limits

To ensure fair usage and system stability, the AI Model API implements rate limits based on your subscription plan.

Plan Requests per Minute Requests per Day Concurrent Requests
Free 10 1,000 2
Basic 60 10,000 5
Pro 300 50,000 20
Enterprise Custom Custom Custom

Rate limit headers are included in every response:

  • X-RateLimit-Limit: Your request limit per minute
  • X-RateLimit-Remaining: Remaining requests in the current window
  • X-RateLimit-Reset: Time when the rate limit resets (UTC timestamp)

AI Models

Our AI Model API provides access to a variety of specialized models for different tasks. Each model is optimized for specific use cases and delivers industry-leading performance.

Available Models

GPT-NeoX

Advanced language model for text generation, summarization, and question answering.

Parameters: 20B Accuracy: 92%

Vision Transformer

State-of-the-art image classification and object detection model.

Parameters: 86M Accuracy: 89%

Whisper Large

Multilingual speech recognition model supporting 99 languages.

Parameters: 1.5B Accuracy: 95%

T5 Multilingual

Text-to-text transfer transformer for translation and summarization.

Parameters: 3B Languages: 100+

CLIP

Connects images and text for zero-shot image classification.

Parameters: 150M Accuracy: 88%

BERT Sentiment

Specialized model for sentiment analysis and emotion detection.

Parameters: 110M Accuracy: 94%

Model Endpoint

GET /models

Retrieve a list of all available AI models with their capabilities and specifications.

Code Examples

curl -X GET "https://api.webburnstech.com/ai/v1/models" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

url = "https://api.webburnstech.com/ai/v1/models"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())
const fetch = require('node-fetch');

const url = 'https://api.webburnstech.com/ai/v1/models';
const headers = {
    'Authorization': 'Bearer YOUR_API_KEY'
};

fetch(url, { headers })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const url = 'https://api.webburnstech.com/ai/v1/models';
const headers = {
    'Authorization': 'Bearer YOUR_API_KEY'
};

fetch(url, { headers })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Text Analysis

Our text analysis endpoints provide powerful natural language processing capabilities including sentiment analysis, entity recognition, and text classification.

POST /text/sentiment

Analyze the sentiment of a text and return a sentiment score between -1 (negative) and 1 (positive).

Request Parameters

Parameter Type Required Description
text string Yes The text to analyze
language string No Language code (default: auto-detect)
model string No Specific model to use (default: best for language)

Code Examples

curl -X POST "https://api.webburnstech.com/ai/v1/text/sentiment" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "I absolutely love this product! It has changed my life for the better.",
    "language": "en"
  }'
import requests

url = "https://api.webburnstech.com/ai/v1/text/sentiment"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "text": "I absolutely love this product! It has changed my life for the better.",
    "language": "en"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const fetch = require('node-fetch');

const url = 'https://api.webburnstech.com/ai/v1/text/sentiment';
const headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
};
const data = {
    text: 'I absolutely love this product! It has changed my life for the better.',
    language: 'en'
};

fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const url = 'https://api.webburnstech.com/ai/v1/text/sentiment';
const headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
};
const data = {
    text: 'I absolutely love this product! It has changed my life for the better.',
    language: 'en'
};

fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Response Example

{
  "sentiment": {
    "score": 0.92,
    "label": "positive",
    "confidence": 0.97
  },
  "language": "en",
  "model_used": "bert-sentiment-en",
  "processing_time": 145
}

Error Handling

The API uses conventional HTTP response codes to indicate the success or failure of an API request.

Code Description
200 Success - The request was successful
400 Bad Request - The request was invalid
401 Unauthorized - API key is missing or invalid
403 Forbidden - Insufficient permissions
404 Not Found - The requested resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - We had a problem with our server
503 Service Unavailable - We're temporarily offline for maintenance

Error Response Format

All error responses include a JSON object with an error code and message.

{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Please try again in 45 seconds.",
    "details": {
      "limit": 60,
      "remaining": 0,
      "reset_time": "2023-11-15T14:30:00Z"
    }
  }
}