Safe Intelligence Assistance Endpoints API Documentation

API Documentation:
SIA-Safe intelligent assistant

Release Date:
December 12, 2024

Your Tech Club

This documentation covers the API endpoints and authentication methods for SIA API service.

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer {YOUR_API_KEY}

API Key Formats

  • Prefix: sk-
  • Example: sk-c6d736e121****************87h8b46c

Endpoints


1. Model Retrieval

  • Endpoint: GET http://sia.yourtechclub.org/api/models
  • Description: Retrieve available AI models
  • Authentication: Required
  • Response: List of available models

Example Request

curl -H "Authorization: Bearer {API_KEY}" http://sia.yourtechclub.org/api/models

2. Chat Completions

  • Endpoint: POST https://sia.yourtechclub.org/api/chat/completions
  • Description: Generate AI-powered chat completions
  • Method: POST
  • Authentication: Required

Request Parameters

{
"model": "model_name",
"messages": [
{
"role": "user",
"content": "What is safe intelligence assistance?"
}
]
}

Example Request

curl -X POST https://sia.yourtechclub.org/api/chat/completions \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "model_name",
"messages": [
{
"role": "user",
"content": "
What is safe intelligence assistance?"
}
]
}'

3. Knowledge Collection File Addition

  • Endpoint: POST https://sia.yourtechclub.org/api/v1/knowledge/{knowledge_id}/file/add
  • Description: Add a file to a knowledge collection
  • Method: POST
  • Authentication: Required

Request Parameters

{
"file_id": "specific-file-identifier"
}

Example Request

curl -X POST https://sia.yourtechclub.org/api/v1/knowledge/{knowledge_id}/file/add \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-d '{"file_id": "your-file-id"}'

Error Handling

Common HTTP Status Codes:

  • 200 OK: Successful request
  • 400 Bad Request: Invalid request format
  • 401 Unauthorized: Invalid API key
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found

Best Practices

  1. Always use HTTPS for secure communications
  2. Protect your API keys
  3. Handle potential errors in your implementation
  4. Validate inputs before sending requests

Support

For additional support, contact YourTechClub support team.

Version: Preliminary Documentation v1.0 Last Updated: December 12, 2024