Tohu SHANNON A.I.
SHANNON A.I.
Kōrero Utu API Rangahau Kamupene Pentest AI Whakaoho Whakaoho
Takiuru
Mahere & Whakamahinga
Kōrero Utu API Rangahau Kamupene Pentest AI Whakaoho Whakaoho Takiuru Mahere & Whakamahinga

Kōwhiria tō reo

He ōrite ngā reo katoa. Kōwhiria te reo e hiahia ana koe ki te whakamahi.

Tuhinga API

Shannon API

He API AI e hototahi ana ki OpenAI me Anthropic, me te function calling, web search, structured outputs hoki.

Tikina tō kī API Whakamātau i te Playground V2
Ngā tuhinga
  • OV Tirohanga whānui
  • CP Āheinga
  • QS Tīmatanga Tere
  • PG API Playground Hou
  • AU Whakamotuhēhē
  • ML Ngā tauira
  • FN Karanga ā‑mahi
  • JS Putanga hanganga
  • SS Rere
  • WS Rapu paetukutuku
  • AN Anthropic
  • SD SDK
  • ER Whakahaere hapa
  • CL Rārangi panoni
  • AK Tō API key
  • US Tō whakamahinga

Shannon AI API Documentation

Tirohanga whānui

Tuhinga tūmatanui

Ngā mea katoa e hiahiatia ana hei timata me te API hototahi OpenAI me Anthropic a Shannon.

URL OpenAI-Compatible
https://api.shannon-ai.com/v1/chat/completions

Whakamahia te Chat Completions API me te function calling me te streaming.

URL Anthropic-Compatible
https://api.shannon-ai.com/v1/messages

Claude Messages format me ngā tools me te anthropic-version header.

HTTP Whakamotuhēhē
Authorization: Bearer <api-key>

Rānei X-API-Key me te anthropic-version mō ngā karanga Claude style.

Uru Tūnga
Tuhinga tūmatanui - me whai kī hei karanga

Streaming, function calling, structured outputs, web search.

Rārangi whakarewa
  • +
    Tohua tō SDK ki Shannon
    Whakaritea te baseURL ki ngā OpenAI, Anthropic endpoints o runga.
    Tautuhinga
  • +
    Tāpiri tō kī API
    Whakamahia ngā Bearer tokens mō ngā karanga OpenAI, rānei X-API-Key + anthropic-version.
    Haumaru
  • +
    Whakahohe tools me structured outputs
    E tautoko ana i ngā OpenAI tools/functions, JSON schema me built-in web_search.
    Āheinga
  • +
    Aroturuki whakamahinga
    Ina takiuru, tirohia te whakamahinga token me te rapu i tēnei whārangi.
    Tātari

Āheinga

OpenAI + Anthropic

He drop-in replacement mō OpenAI me Anthropic APIs; he tautoko mō tools, structured outputs, me built-in web search.

AI

Drop-in Replacement

Compatible

Ka mahi me ngā OpenAI me Anthropic SDK. Me huri noa i te base URL.

AI

Karanga Mahi

Tools

Whakamārama tools, ā, waiho mā Shannon e karanga. E tautoko ana i auto, forced, none.

AI

Rapu paetukutuku

Rapua

Web search wā-tūturu me ngā tohutoro puna. Wātea aunoa.

AI

Putanga hanganga

JSON

JSON mode me JSON Schema enforcement mō te tango raraunga pono.

AI

Multi-turn Tools

Agentic

Automatic function execution loops. Tae atu ki te 10 iterations ia tono.

AI

Rere

Fast

Server-sent events mō te real-time token streaming.

Tīmatanga Tere

5 meneti

Tīmata i roto i ngā hikoinga e toru. Ka whakaata a Shannon i ngā kaihoko OpenAI me Anthropic.

1

Tautuhi Base URL

Whakamahia te OpenAI-compatible endpoint.

https://api.shannon-ai.com/v1/chat/completions
2

Tāpiri kī API

Whakamahia te Bearer auth i te Authorization header.

3

Tukua tō karere tuatahi

Kōwhiria he reo ka whakawhiti i tō kī.

Python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1"
)

response = client.chat.completions.create(
    model="shannon-1.6-lite",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello, Shannon!"}
    ],
    max_tokens=1024
)

print(response.choices[0].message.content)
JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.shannon-ai.com/v1'
});

const response = await client.chat.completions.create({
  model: 'shannon-1.6-lite',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Hello, Shannon!' }
  ],
  max_tokens: 1024
});

console.log(response.choices[0].message.content);
Go
package main

import (
    "context"
    "fmt"
    openai "github.com/sashabaranov/go-openai"
)

func main() {
    config := openai.DefaultConfig("YOUR_API_KEY")
    config.BaseURL = "https://api.shannon-ai.com/v1"
    client := openai.NewClientWithConfig(config)

    resp, err := client.CreateChatCompletion(
        context.Background(),
        openai.ChatCompletionRequest{
            Model: "shannon-1.6-lite",
            Messages: []openai.ChatCompletionMessage{
                {Role: "system", Content: "You are a helpful assistant."},
                {Role: "user", Content: "Hello, Shannon!"},
            },
            MaxTokens: 1024,
        },
    )
    if err != nil {
        panic(err)
    }
    fmt.Println(resp.Choices[0].Message.Content)
}
cURL
curl -X POST "https://api.shannon-ai.com/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "shannon-1.6-lite",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello, Shannon!"}
    ],
    "max_tokens": 1024
  }'

Response format

Success Response
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1234567890,
  "model": "Shannon 1.6 Lite",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! I'm Shannon, your AI assistant. How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 25,
    "completion_tokens": 18,
    "total_tokens": 43
  }
}

API Playground

Hou

Whakamātauria te Shannon API i tō pūtirotiro. Hangaia te tono, whakahaere, ā, mātaki i te whakautu wā-tūturu.

1

Chat, Responses, Messages

Switch across OpenAI Chat Completions, Responses, and Anthropic Messages without leaving the playground.

2

Stream live output

Run real requests, inspect raw JSON, and view stream events from the same operator console.

3

Reuse your key

Signed-in users can pull their Shannon API key straight into the dedicated playground workspace.

/mi/docs/playground

The playground now lives on its own route so the API docs stay Astro-rendered while the request builder remains an explicitly interactive client tool.

Whakamātau i te Playground V2 Tikina tō kī API

Whakamotuhēhē

Me whakamahi i tō Shannon API key mō ngā tono API katoa.

OpenAI Format (Recommended)

HTTP
Authorization: Bearer YOUR_API_KEY

Anthropic

HTTP
X-API-Key: YOUR_API_KEY
anthropic-version: 2023-06-01

Ngā tauira

Ka tuku a Shannon i ngā tauira maha mō ngā whakamahinga rerekē.

AI
shannon-1.6-lite Shannon 1.6 Lite

Ngā whakautu tere, pai mō ngā mahi o ia rā

Horopaki 128K
I Hangaia mō ngā Ngaio Haumarutanga Kōrerorero, Q&A, Hanga Ihirangi
AI
shannon-1.6-pro Shannon 1.6 Pro

Mō ngā raruraru uaua: reasoning hōhonu

Horopaki 128K
I Hangaia mō ngā Ngaio Haumarutanga Tātari, Rangahau, Mahi uaua
AI
shannon-2-lite Shannon 2 Lite

Horopaki 128K
I Hangaia mō ngā Ngaio Haumarutanga
AI
shannon-2-pro Shannon 2 Pro

Horopaki 128K
I Hangaia mō ngā Ngaio Haumarutanga
AI
shannon-coder-1 Shannon Coder

I arotau mō Claude Code CLI me te call-based quota

Horopaki 128K
I Hangaia mō ngā Ngaio Haumarutanga Hanga Waehere, Whakamahi Tools, CLI Integration
Call-based quota

Karanga ā‑mahi

Whakamārama ngā tools ka taea e Shannon te karanga hei mahi, hei tiki mōhiohio.

Python
from openai import OpenAI
import json

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1"
)

# Define available tools/functions
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get current weather for a location",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {
                        "type": "string",
                        "description": "City name, e.g., 'Tokyo'"
                    },
                    "unit": {
                        "type": "string",
                        "enum": ["celsius", "fahrenheit"]
                    }
                },
                "required": ["location"]
            }
        }
    }
]

response = client.chat.completions.create(
    model="shannon-1.6-lite",
    messages=[{"role": "user", "content": "What's the weather in Tokyo?"}],
    tools=tools,
    tool_choice="auto"
)

# Check if model wants to call a function
if response.choices[0].message.tool_calls:
    tool_call = response.choices[0].message.tool_calls[0]
    print(f"Function: {tool_call.function.name}")
    print(f"Arguments: {tool_call.function.arguments}")
JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.shannon-ai.com/v1'
});

const tools = [
  {
    type: 'function',
    function: {
      name: 'get_weather',
      description: 'Get current weather for a location',
      parameters: {
        type: 'object',
        properties: {
          location: { type: 'string', description: "City name" },
          unit: { type: 'string', enum: ['celsius', 'fahrenheit'] }
        },
        required: ['location']
      }
    }
  }
];

const response = await client.chat.completions.create({
  model: 'shannon-1.6-lite',
  messages: [{ role: 'user', content: "What's the weather in Tokyo?" }],
  tools,
  tool_choice: 'auto'
});

if (response.choices[0].message.tool_calls) {
  const toolCall = response.choices[0].message.tool_calls[0];
  console.log('Function:', toolCall.function.name);
  console.log('Arguments:', toolCall.function.arguments);
}

Karanga ā‑mahi

"auto" Ka whakatau te tauira mēnā ka karanga function (default)
"none" Katia te function calling mō tēnei tono
{"type": "function", "function": {"name": "..."}} Whakakaha i tētahi function call motuhake

Response format

Ina karanga te tauira i te function
{
  "id": "chatcmpl-xyz",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": null,
        "tool_calls": [
          {
            "id": "call_abc123",
            "type": "function",
            "function": {
              "name": "get_weather",
              "arguments": "{\"location\": \"Tokyo\", \"unit\": \"celsius\"}"
            }
          }
        ]
      },
      "finish_reason": "tool_calls"
    }
  ]
}

Putanga hanganga

Whakakaha i a Shannon kia whakahoki JSON tika e hāngai ana ki tō schema.

Python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1"
)

# Force JSON output with schema
response = client.chat.completions.create(
    model="shannon-1.6-lite",
    messages=[
        {"role": "user", "content": "Extract: John Doe, 30 years old, engineer"}
    ],
    response_format={
        "type": "json_schema",
        "json_schema": {
            "name": "person_info",
            "schema": {
                "type": "object",
                "properties": {
                    "name": {"type": "string"},
                    "age": {"type": "integer"},
                    "occupation": {"type": "string"}
                },
                "required": ["name", "age", "occupation"]
            }
        }
    }
)

import json
data = json.loads(response.choices[0].message.content)
print(data)  # {"name": "John Doe", "age": 30, "occupation": "engineer"}
JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.shannon-ai.com/v1'
});

const response = await client.chat.completions.create({
  model: 'shannon-1.6-lite',
  messages: [
    { role: 'user', content: 'Extract: John Doe, 30 years old, engineer' }
  ],
  response_format: {
    type: 'json_schema',
    json_schema: {
      name: 'person_info',
      schema: {
        type: 'object',
        properties: {
          name: { type: 'string' },
          age: { type: 'integer' },
          occupation: { type: 'string' }
        },
        required: ['name', 'age', 'occupation']
      }
    }
  }
});

const data = JSON.parse(response.choices[0].message.content);
console.log(data); // { name: "John Doe", age: 30, occupation: "engineer" }

Response format

{"type": "json_object"} Whakakaha JSON output tika (kāore he schema motuhake)
{"type": "json_schema", "json_schema": {...}} Whakakaha output e hāngai ana ki tō schema tika

Rere

Whakahohe real-time token streaming mā Server-Sent Events mō ngā UI tere.

Python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1"
)

# Enable streaming for real-time responses
stream = client.chat.completions.create(
    model="shannon-1.6-lite",
    messages=[
        {"role": "user", "content": "Write a short poem about AI"}
    ],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.shannon-ai.com/v1'
});

// Enable streaming for real-time responses
const stream = await client.chat.completions.create({
  model: 'shannon-1.6-lite',
  messages: [
    { role: 'user', content: 'Write a short poem about AI' }
  ],
  stream: true
});

for await (const chunk of stream) {
  const content = chunk.choices[0]?.delta?.content;
  if (content) process.stdout.write(content);
}
Tohutohu: Ka tae mai ngā streaming response hei Server-Sent Events. Kei ia chunk he delta kōrero wāhanga.

Rapu paetukutuku

Kei a Shannon te function web_search e wātea aunoa ana.

Python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/v1"
)

# Web search is automatically available!
# Shannon will use it when needed for current information

response = client.chat.completions.create(
    model="shannon-1.6-lite",
    messages=[
        {"role": "user", "content": "What are the latest AI news today?"}
    ],
    # Optionally, explicitly define web_search tool
    tools=[{
        "type": "function",
        "function": {
            "name": "web_search",
            "description": "Search the web for current information",
            "parameters": {
                "type": "object",
                "properties": {
                    "query": {"type": "string", "description": "Search query"}
                },
                "required": ["query"]
            }
        }
    }]
)

print(response.choices[0].message.content)
# Response includes sources and citations
JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.shannon-ai.com/v1'
});

// Web search is automatically available!
// Shannon will use it when needed for current information

const response = await client.chat.completions.create({
  model: 'shannon-1.6-lite',
  messages: [
    { role: 'user', content: 'What are the latest AI news today?' }
  ],
  // Optionally, explicitly define web_search tool
  tools: [{
    type: 'function',
    function: {
      name: 'web_search',
      description: 'Search the web for current information',
      parameters: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search query' }
        },
        required: ['query']
      }
    }
  }]
});

console.log(response.choices[0].message.content);
// Response includes sources and citations
Tohutohu: Kei ngā hua web search ngā citation. Ka tohu a Shannon i ngā puna aunoa.

Anthropic

Ka tautoko hoki a Shannon i te Anthropic Messages API format.

https://api.shannon-ai.com/v1/messages
Python
import anthropic

client = anthropic.Anthropic(
    api_key="YOUR_API_KEY",
    base_url="https://api.shannon-ai.com/messages"
)

response = client.messages.create(
    model="shannon-1.6-lite",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Hello, Shannon!"}
    ],
    # Tool use (Anthropic format)
    tools=[{
        "name": "web_search",
        "description": "Search the web",
        "input_schema": {
            "type": "object",
            "properties": {
                "query": {"type": "string"}
            },
            "required": ["query"]
        }
    }]
)

print(response.content[0].text)
JavaScript
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.shannon-ai.com/messages'
});

const response = await client.messages.create({
  model: 'shannon-1.6-lite',
  max_tokens: 1024,
  messages: [
    { role: 'user', content: 'Hello, Shannon!' }
  ],
  // Tool use (Anthropic format)
  tools: [{
    name: 'web_search',
    description: 'Search the web',
    input_schema: {
      type: 'object',
      properties: {
        query: { type: 'string' }
      },
      required: ['query']
    }
  }]
});

console.log(response.content[0].text);
Required: E hiahiatia ana anthropic-version: 2023-06-01.

SDK

Compatible

Whakamahia tētahi OpenAI, Anthropic SDK — me huri noa i te base URL.

OpenAI-Compatible SDKs

SDK Python

Official OpenAI Python SDK — ka mahi me Shannon

pip install openai
Tirohia ngā tuhinga ->
SDK JavaScript / TypeScript

Official OpenAI Node.js SDK — ka mahi me Shannon

npm install openai
Tirohia ngā tuhinga ->
SDK Go

Community Go client mō ngā OpenAI-compatible APIs

go get github.com/sashabaranov/go-openai
Tirohia ngā tuhinga ->
SDK Ruby

Community Ruby client mō ngā OpenAI-compatible APIs

gem install ruby-openai
Tirohia ngā tuhinga ->
SDK PHP

Community PHP client mō ngā OpenAI-compatible APIs

composer require openai-php/client
Tirohia ngā tuhinga ->
SDK Rust

Async Rust client mō ngā OpenAI-compatible APIs

cargo add async-openai
Tirohia ngā tuhinga ->

Anthropic-Compatible SDKs

SDK Python (Anthropic)

Official Anthropic Python SDK — ka mahi me Shannon

pip install anthropic
Tirohia ngā tuhinga ->
SDK TypeScript (Anthropic)

Official Anthropic TypeScript SDK — ka mahi me Shannon

npm install @anthropic-ai/sdk
Tirohia ngā tuhinga ->

Whakahaere hapa

Ka whakamahi a Shannon i ngā HTTP status code paerewa, ā, ka whakahoki i ngā karere hapa taipitopito.

400 Bad Request He hē te format o te tono, o ngā tawhā rānei
401 Unauthorized He hē, he ngaro rānei te API key
402 Quota Exceeded Kua hipa te quota token, rapu rānei
429 Rate Limited He nui rawa ngā tono, whakaroa
500 Server Error Hapa ā-roto, whakamātau anō ā muri ake

Error Response Format

Error Response
{
  "error": {
    "message": "Invalid API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

Rārangi panoni

LOG

Ngā whakahou me ngā whakapainga hou o te Shannon API.

v2.1.0
2025-01-03
  • Hou Kua tāpirihia te tauira shannon-coder-1 mō te Claude Code CLI integration
  • Hou Pūnaha call-based quota mō te Coder model
  • Whakapainga Kua pai ake te whakaponotanga o te function calling
v2.0.0
2024-12-15
  • Hou Kua tāpirihia te Anthropic Messages API compatibility
  • Hou Multi-turn tool execution (tae atu ki te 10 iterations)
  • Hou Tautoko mō te JSON Schema response format
  • Whakapainga Kua pai ake te web search me ngā citation
v1.5.0
2024-11-20
  • Hou Kua tāpirihia te shannon-deep-dapo mō te reasoning uaua
  • Hou Built-in web_search function
  • Whakapainga Kua heke te latency o te streaming responses
v1.0.0
2024-10-01
  • Hou Tukunga tuatahi o te API
  • Hou OpenAI-compatible chat completions endpoint
  • Hou Function calling support
  • Hou Streaming mā Server-Sent Events

Tō API key

Uru
Whakamahia ngā Bearer tokens mō ngā karanga OpenAI, rānei X-API-Key + anthropic-version.
YOUR_API_KEY
Tikina tō kī API

Kia huna tō API key. Mā te Regenerate ka waihanga i tētahi key hou, ka whakakore i te tawhito.

Version: 1
Last rotated: Never
Last used: Never

Tō whakamahinga

Ina takiuru, tirohia te whakamahinga token me te rapu i tēnei whārangi.

-- API Calls
-- Tokens Used

Shannon Coder (shannon-coder-1)

Call-based quota mō Shannon Coder (shannon-coder-1). Ka reset ia 4 hāora.

0 Calls Used
0 Calls Remaining

Kua reri ki te hanga?

Tikina tō API key, ka tīmata ki te hanga me Shannon AI i tēnei rā.

Tikina API key Tirohia ngā utu

Rapu rongonui:

Whakamātau kupu matua kē
Whakatere: ↑ ↓ Kōwhiri: Enter Katia: Esc