Open Intelligence

API Reference

Endpoints, parameters, and response schemas.

https://oiv1.bcworks.in.net
Auth: Authorization: Bearer YOUR_API_KEY Get keys at oi.bcworks.in.net

Endpoints

GET /health

Check API status and model availability. No auth required.

Auth: None Latency: 20-50 ms
Example request
bash
curl https://oiv1.bcworks.in.net/health
Example response
json
{
  "status": "healthy",
  "version": "1.0.0",
  "models_loaded": {
    "vision": true,
    "language": true,
    "database": true
  }
}
POST /v1/chat/completions

Generate a chat response. Returns the top reply and token usage.

Auth: Bearer token Latency: 1-3 s (text), 2-5 s (image)
Example request
bash
curl -X POST https://oiv1.bcworks.in.net/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello"}]}'
Example response
json
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "OIv1",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Hi there!"
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 8,
    "completion_tokens": 4,
    "total_tokens": 12
  }
}

Request body

messages required array List of message objects with role and content.
max_tokens optional integer Max tokens to generate. Default: 150.
temperature optional float Sampling temperature 0.0-1.0. Default: 0.7.

Message object

role required string "system", "user", or "assistant".
content required string The text content.
image optional string Base64 data URI: data:image/jpeg;base64,...

Multimodal request

json
{
  "messages": [{
    "role": "user",
    "content": "What is in this image?",
    "image": "data:image/jpeg;base64,/9j/4AAQ..."
  }],
  "max_tokens": 200
}

Error responses

CodeMeaningExample
400Bad Request{"detail":{"error":{"message":"messages field required"}}}
401Unauthorized{"detail":{"error":{"message":"Invalid API key","code":"invalid_api_key"}}}
429Rate Limited{"detail":{"error":{"message":"Rate limit exceeded","code":"rate_limit"}}}
500Server Error{"detail":{"error":{"message":"Internal server error"}}}

Try It

Send a test request

Response will appear here.

Client-side only. Your key is sent directly to the API and never stored.

API Keys

Create and manage keys at oi.bcworks.in.net. Sign in with Clerk, then generate keys from the dashboard. Each key is linked to your account for usage tracking.

Rate Limits

TierRequests/minMax tokens
FreeUnlimited2048