Skip to main content

Introduction

Our RESTful API is designed to be simple, efficient, and developer-friendly. This guide will help you quickly understand how to start integrating our services into your applications using standard HTTP conventions.

Simple API Requests

Our API uses only the two most common HTTP methods:
  • GET: Retrieve data from the server
  • POST: Send data to the server
We deliberately keep the surface area small; no PUT, PATCH, or DELETE to worry about.

Key Concepts

All requests should include these headers:
  • Content-Type: application/json
  • Authorization: Bearer {api_key}
Interacting with the API requires a Bearer token:
Authorization: Bearer sk-abc123yourapikey
You can generate API keys from your organization settings. Tokens are tied to your organization and rate-limited per key.
  • For GET requests, include data as query parameters:
https://api.secton.org/v1/models?category=chat&sort=name
  • For POST requests, send data as JSON:
{
  "model": "copilot-zero",
  "messages": [
    { "role": "user", "content": "Tell me a joke" }
  ],
  "temperature": 0.8
}
All responses are JSON. Sample response:
{
  "object": "chat.completion",
  "model": "copilot-zero",
  "organization_id": "org_12345678",
  "messages": [
    { "role": "user", "content": "Tell me a joke" },
    { "role": "assistant", "content": "Why don't skeletons fight each other? They don't have the guts." }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 16,
    "total_tokens": 28
  }
}
All responses also include meaningful HTTP status codes (200, 400, 403, 429).
The API enforces limits per organization and API key. Exceeding the limit returns a 429 Too Many Requests response. Rate limits reset automatically after a short cooldown.

Try It Live

I