Documentation

Introduction
Welcome to the Cygnis AI Studio API. Use our powerful RAG model to answer questions with contextual knowledge.

The API provides a simple interface to our AI model, Cygnis A1. All you need to do is send a question, and we'll return a polished, context-aware answer along with its sources.

Authentication
Authenticate your API requests by providing your API key.

All API requests must be authenticated with an API key. For this demo, please use the static key provided below.

Include your API key in the `Authorization` header with the `Bearer` scheme.

Authorization: Bearer $cgn_live_stable_demo_api_key_012345
Endpoints
POST

/api/ask

Ask a question to the Cygnis A1 model.

Request Body (JSON)

{ "question": "string" }

Example Request

curl -X POST https://cygnis-ai-studio.vercel.app/api/ask \
  -H "Authorization: Bearer cgn_live_stable_demo_api_key_012345" \
  -H "Content-Type: application/json" \
  -d '{"question": "Who discovered penicillin?"}'

Example Response (200 OK)

{
  "answer": "The discovery of penicillin is attributed to Scottish scientist Alexander Fleming in 1928.",
  "sources": [
    "History of penicillin",
    "Alexander Fleming"
  ]
}