Developer Guide

Everything you need to integrate Vedaslab API into your applications. Our API is fully compatible with OpenAI's format, making migration seamless.

Quick Start

  1. 1
    Create an account

    Sign up at api.vedaslab.in

  2. 2
    Get your API key

    Navigate to Dashboard → API Keys → Create New Key

  3. 3
    Make your first API call

    Use the code examples below to get started

Authentication

All API requests require authentication using your API key. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Security Note

Never expose your API key in client-side code. Always make API calls from your backend server.

API Endpoints

POST /public/api.php?path=chat/completions

Create a chat completion with any available model

GET /v1/models

List all available AI models

GET /v1/usage

Check your API usage and remaining credits

Available Models

Premium Models

  • claude-opus-4.5-prev 200k ctx
  • claude-sonnet-4.5 200k ctx
  • gemini-2.5-pro 2M ctx
  • gpt-5 128k ctx
  • gpt-5.1-preview 128k ctx

Free Models

  • gpt-4.1 128k ctx
  • gpt-4o 128k ctx
  • gpt-5-mini 128k ctx
  • grok-code-fast-1 128k ctx
  • raptor-mini-prev Unknown

Code Examples

Python

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.vedaslab.in/public/api.php?path=chat/completions"
)

response = client.chat.completions.create(
    model="gpt-5",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

JavaScript / Node.js

const response = await fetch('https://api.vedaslab.in/public/api.php?path=chat/completions', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: JSON.stringify({
        model: 'gpt-5',
        messages: [{ role: 'user', content: 'Hello!' }]
    })
});

const data = await response.json();
console.log(data.choices[0].message.content);

cURL

curl https://api.vedaslab.in/public/api.php?path=chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Rate Limits

Plan Requests/min Tokens/day
Free 10 50,000
Pro 60 500,000
Enterprise Unlimited Custom

Error Handling

401 Unauthorized

Invalid or missing API key. Check your Authorization header.

429 Rate Limited

Too many requests. Back off and retry with exponential backoff.

500 Server Error

Something went wrong on our end. Retry the request or contact support.

Need Help?

Our team is here to help you integrate successfully