SHANNON A.I. ਲੋਗੋ
SHANNON A.I.
ਚੈਟ ਕੀਮਤ API ਖੋਜ ਕੰਪਨੀ Pentest AI ਸਟਾਰਟਅਪ ਬੂਸਟ
ਸਾਈਨ ਇਨ
ਯੋਜਨਾ ਅਤੇ ਵਰਤੋਂ
ਚੈਟ ਕੀਮਤ API ਖੋਜ ਕੰਪਨੀ Pentest AI ਸਟਾਰਟਅਪ ਬੂਸਟ ਸਾਈਨ ਇਨ ਯੋਜਨਾ ਅਤੇ ਵਰਤੋਂ

ਆਪਣੀ ਭਾਸ਼ਾ ਚੁਣੋ

ਸਭ ਭਾਸ਼ਾਵਾਂ ਬਰਾਬਰ ਹਨ। ਜਿਸ ਭਾਸ਼ਾ ਨੂੰ ਤੁਸੀਂ ਵਰਤਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਉਹ ਚੁਣੋ।

API ਡੌਕਯੂਮੈਂਟੇਸ਼ਨ

Shannon API

OpenAI ਅਤੇ Anthropic ਨਾਲ ਅਨੁਕੂਲ AI API — ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ, ਵੈੱਬ ਖੋਜ ਅਤੇ ਸਟ੍ਰਕਚਰਡ ਆਉਟਪੁੱਟਸ ਨਾਲ।

ਆਪਣੀ API ਕੀ ਪ੍ਰਾਪਤ ਕਰੋ ਪਲੇਗ੍ਰਾਊਂਡ ਅਜ਼ਮਾਓ V2
ਡੌਕਯੂਮੈਂਟੇਸ਼ਨ
  • OV ਸੰਖੇਪ
  • CP ਸਮਰੱਥਾਵਾਂ
  • QS ਤੁਰੰਤ ਸ਼ੁਰੂ
  • PG API ਪਲੇਗਰਾਊਂਡ ਨਵਾਂ
  • AU ਪਰਮਾਣਿਕਤਾ
  • ML ਮਾਡਲ
  • FN ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ
  • JS ਸਟ੍ਰਕਚਰਡ ਆਉਟਪੁੱਟਸ
  • SS ਸਟ੍ਰੀਮਿੰਗ
  • WS ਵੈੱਬ ਖੋਜ
  • AN Anthropic
  • CT cli-tools ਨਵਾਂ
  • SD SDKs
  • ER ਗਲਤੀਆਂ
  • CL ਬਦਲਾਅ ਲੌਗ
  • AK API ਕੀ
  • US ਵਰਤੋਂ

Shannon AI API Documentation

ਸੰਖੇਪ

ਪਬਲਿਕ ਡੌਕਸ

Shannon ਦੇ OpenAI ਅਤੇ Anthropic ਨਾਲ ਅਨੁਕੂਲ API ਨਾਲ ਸ਼ਿਪ ਕਰਨ ਲਈ ਸਭ ਕੁਝ।

URL OpenAI‑ਅਨੁਕੂਲ
https://api.shannon-ai.com/v1/chat/completions

ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ ਅਤੇ ਸਟ੍ਰੀਮਿੰਗ ਨਾਲ Chat Completions API ਵਰਤੋ।

URL Anthropic‑ਅਨੁਕੂਲ
https://api.shannon-ai.com/v1/messages

Claude Messages ਫਾਰਮੈਟ ਟੂਲਜ਼ ਅਤੇ anthropic-version ਹੈਡਰ ਨਾਲ।

ਹੈਡਰ ਪ੍ਰਮਾਣਿਕਤਾ
Authorization: Bearer <api-key>

ਜਾਂ Claude‑ਸਟਾਈਲ ਕਾਲਾਂ ਲਈ X-API-Key ਨਾਲ anthropic-version।

ਐਕਸੇਸ ਸਟੇਟਸ
ਪਬਲਿਕ ਡੌਕਸ - ਕਾਲ ਲਈ ਕੀ ਲੋੜੀਂਦੀ ਹੈ

ਸਟ੍ਰੀਮਿੰਗ, ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ, ਸਟ੍ਰਕਚਰਡ ਆਉਟਪੁੱਟਸ, ਵੈੱਬ ਸਰਚ।

ਲਾਂਚ ਚੈਕਲਿਸਟ
  • +
    ਆਪਣੀ SDK ਨੂੰ Shannon ਵੱਲ ਪੌਇੰਟ ਕਰੋ
    baseURL ਨੂੰ ਉੱਪਰ ਦਿੱਤੀਆਂ OpenAI ਜਾਂ Anthropic endpoints ਉੱਤੇ ਸੈਟ ਕਰੋ।
    ਸੈਟਅਪ
  • +
    ਆਪਣੀ API ਕੀ ਜੋੜੋ
    OpenAI ਕਾਲਾਂ ਲਈ Bearer ਟੋਕਨ ਜਾਂ X-API-Key + anthropic-version ਵਰਤੋ।
    ਸੁਰੱਖਿਆ
  • +
    ਟੂਲਜ਼ ਅਤੇ structured outputs ਚਾਲੂ ਕਰੋ
    OpenAI tools/functions, JSON schema ਅਤੇ built-in web_search ਸਪੋਰਟ ਕਰਦਾ ਹੈ।
    ਸਮਰੱਥਾ
  • +
    ਵਰਤੋਂ ਟ੍ਰੈਕ ਕਰੋ
    ਜਦੋਂ ਤੁਸੀਂ ਸਾਈਨ ਇਨ ਹੋਵੇ, ਇਸ ਪੇਜ ’ਤੇ ਟੋਕਨ ਅਤੇ ਸਰਚ ਦੀ ਖਪਤ ਵੇਖੋ।
    ਐਨਾਲਿਟਿਕਸ

ਸਮਰੱਥਾਵਾਂ

OpenAI + Anthropic

OpenAI ਅਤੇ Anthropic API ਲਈ drop‑in ਰਿਪਲੇਸਮੈਂਟ, ਟੂਲਜ਼, ਸਟ੍ਰਕਚਰਡ ਆਉਟਪੁੱਟ ਅਤੇ ਬਿਲਟ‑ਇਨ ਵੈੱਬ ਖੋਜ ਸਹਾਇਤਾ ਨਾਲ।

AI

ਡ੍ਰੌਪ‑ਇਨ ਰਿਪਲੇਸਮੈਂਟ

ਅਨੁਕੂਲ

OpenAI ਅਤੇ Anthropic SDKs ਨਾਲ ਕੰਮ ਕਰਦਾ ਹੈ। ਸਿਰਫ base URL ਬਦਲੋ।

AI

ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ

ਟੂਲਜ਼

ਟੂਲਜ਼ ਪਰਿਭਾਸ਼ਿਤ ਕਰੋ, Shannon ਉਨ੍ਹਾਂ ਨੂੰ ਕਾਲ ਕਰੇਗਾ। auto, forced ਅਤੇ none ਮੋਡ ਸਪੋਰਟ।

AI

ਬਿਲਟ‑ਇਨ ਵੈੱਬ ਸਰਚ

ਖੋਜ

ਸਰੋਤ ਸਿਟੇਸ਼ਨਾਂ ਨਾਲ ਰੀਅਲ‑ਟਾਈਮ ਵੈੱਬ ਸਰਚ। ਆਪਣੇ ਆਪ ਉਪਲਬਧ।

AI

ਸਟ੍ਰਕਚਰਡ ਆਉਟਪੁੱਟਸ

JSON

ਭਰੋਸੇਯੋਗ ਡੇਟਾ ਲਈ JSON ਮੋਡ ਅਤੇ JSON Schema enforcement।

AI

ਮਲਟੀ‑ਟਰਨ ਟੂਲਜ਼

ਐਜੈਂਟਿਕ

ਆਟੋਮੈਟਿਕ ਫੰਕਸ਼ਨ ਐਗਜ਼ਿਕਿਊਸ਼ਨ ਲੂਪ। ਹਰ ਰਿਕਵੇਸਟ ’ਤੇ 10 iterations ਤੱਕ।

AI

ਸਟ੍ਰੀਮਿੰਗ

ਤੇਜ਼

ਰੀਅਲ‑ਟਾਈਮ ਟੋਕਨ ਸਟ੍ਰੀਮਿੰਗ ਲਈ Server‑Sent Events।

ਤੁਰੰਤ ਸ਼ੁਰੂ

5 ਮਿੰਟ

ਤਿੰਨ ਕਦਮਾਂ ਵਿੱਚ ਸ਼ੁਰੂ ਕਰੋ। Shannon OpenAI ਅਤੇ Anthropic ਕਲਾਇੰਟਾਂ ਨੂੰ ਦਰਸਾਉਂਦਾ ਹੈ।

1

ਆਪਣਾ base URL ਸੈਟ ਕਰੋ

OpenAI‑ਅਨੁਕੂਲ endpoint ਵਰਤੋ।

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

ਆਪਣੀ API ਕੀ ਜੋੜੋ

Authorization ਹੈਡਰ ਵਿੱਚ Bearer auth ਵਰਤੋ।

3

ਆਪਣਾ ਪਹਿਲਾ ਸੁਨੇਹਾ ਭੇਜੋ

ਭਾਸ਼ਾ ਚੁਣੋ ਅਤੇ ਆਪਣੀ ਕੀ ਪੇਸਟ ਕਰੋ।

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
  }'

ਰਿਸਪਾਂਸ ਫਾਰਮੈਟ

ਸਫਲ ਰਿਸਪਾਂਸ
{
  "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 ਪਲੇਗਰਾਊਂਡ

ਨਵਾਂ

ਆਪਣੇ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਸਿੱਧਾ Shannon API ਟੈਸਟ ਕਰੋ। ਆਪਣੀ ਰਿਕਵੇਸਟ ਬਣਾਓ, ਚਲਾਓ ਅਤੇ ਰੀਅਲ‑ਟਾਈਮ ਜਵਾਬ ਵੇਖੋ।

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.

/pa/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.

ਪਲੇਗ੍ਰਾਊਂਡ ਅਜ਼ਮਾਓ V2 ਆਪਣੀ API ਕੀ ਪ੍ਰਾਪਤ ਕਰੋ

ਪਰਮਾਣਿਕਤਾ

ਸਾਰੀਆਂ API ਬੇਨਤੀਆਂ ਲਈ ਤੁਹਾਡੇ Shannon API ਕੀ ਨਾਲ ਪਰਮਾਣਿਕਤਾ ਜ਼ਰੂਰੀ ਹੈ।

OpenAI ਫਾਰਮੈਟ (ਸਿਫ਼ਾਰਸ਼ੀ)

HTTP
Authorization: Bearer YOUR_API_KEY

Anthropic ਫਾਰਮੈਟ

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

ਮਾਡਲ

Shannon ਵੱਖ‑ਵੱਖ ਵਰਤੋਂ ਮਾਮਲਿਆਂ ਲਈ ਆਪਟੀਮਾਈਜ਼ ਕੀਤੇ ਕਈ ਮਾਡਲ ਦਿੰਦਾ ਹੈ।

AI
shannon-1.6-lite Shannon 1.6 Lite

ਰੋਜ਼ਾਨਾ ਕੰਮਾਂ ਲਈ ਤੇਜ਼, ਪ੍ਰਭਾਵਸ਼ਾਲੀ ਜਵਾਬ

ਸੰਦਰਭ 128K
ਇਸ ਲਈ ਵਧੀਆ ਚੈਟ, Q&A, ਸਮੱਗਰੀ ਜਨਰੇਸ਼ਨ
AI
shannon-1.6-pro Shannon 1.6 Pro

ਜਟਿਲ ਸਮੱਸਿਆਵਾਂ ਲਈ ਉੱਚ ਦਰਜੇ ਦੀ ਰੀਜ਼ਨਿੰਗ

ਸੰਦਰਭ 128K
ਇਸ ਲਈ ਵਧੀਆ ਵਿਸ਼ਲੇਸ਼ਣ, ਰਿਸਰਚ, ਜਟਿਲ ਕੰਮ
AI
shannon-2-lite Shannon 2 Lite

ਸੰਦਰਭ 128K
ਇਸ ਲਈ ਵਧੀਆ
AI
shannon-2-pro Shannon 2 Pro

ਸੰਦਰਭ 128K
ਇਸ ਲਈ ਵਧੀਆ
AI
shannon-coder-1 Shannon Coder

ਕਾਲ‑ਅਧਾਰਿਤ ਕੋਟਾ ਨਾਲ Claude Code CLI ਲਈ ਅਪਟੀਮਾਈਜ਼ਡ

ਸੰਦਰਭ 128K
ਇਸ ਲਈ ਵਧੀਆ ਕੋਡ ਜਨਰੇਸ਼ਨ, ਟੂਲ ਵਰਤੋਂ, CLI ਇੰਟੀਗ੍ਰੇਸ਼ਨ
ਕਾਲ‑ਅਧਾਰਿਤ ਕੋਟਾ

ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ

ਉਹ ਟੂਲਜ਼ ਪਰਿਭਾਸ਼ਿਤ ਕਰੋ ਜਿਨ੍ਹਾਂ ਨੂੰ Shannon ਕਾਰਵਾਈ ਕਰਨ ਜਾਂ ਜਾਣਕਾਰੀ ਲੈਣ ਲਈ ਕਾਲ ਕਰ ਸਕਦਾ ਹੈ।

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);
}

ਟੂਲ ਚੋਇਸ ਓਪਸ਼ਨ

"auto" ਮਾਡਲ ਫੈਸਲਾ ਕਰਦਾ ਹੈ ਕਿ ਫੰਕਸ਼ਨ ਕਾਲ ਕਰਨੀ ਹੈ ਜਾਂ ਨਹੀਂ (ਡਿਫਾਲਟ)
"none" ਇਸ ਰਿਕਵੇਸਟ ਲਈ ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ ਬੰਦ ਕਰੋ
{"type": "function", "function": {"name": "..."}} ਕਿਸੇ ਖਾਸ ਫੰਕਸ਼ਨ ਕਾਲ ਨੂੰ ਫੋਰਸ ਕਰੋ

ਫੰਕਸ਼ਨ ਕਾਲ ਰਿਸਪਾਂਸ

ਜਦੋਂ ਮਾਡਲ ਫੰਕਸ਼ਨ ਕਾਲ ਕਰਦਾ ਹੈ
{
  "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"
    }
  ]
}

ਸਟ੍ਰਕਚਰਡ ਆਉਟਪੁੱਟਸ

Shannon ਨੂੰ ਤੁਹਾਡੀ ਸਕੀਮ ਨਾਲ ਮੇਲ ਖਾਂਦਾ ਵੈਧ JSON ਵਾਪਸ ਕਰਨ ਲਈ ਮਜਬੂਰ ਕਰੋ।

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" }

ਰਿਸਪਾਂਸ ਫਾਰਮੈਟ ਓਪਸ਼ਨ

{"type": "json_object"} ਵੈਧ JSON ਆਉਟਪੁੱਟ ਫੋਰਸ ਕਰੋ (ਕੋਈ ਖਾਸ ਸਕੀਮਾ ਨਹੀਂ)
{"type": "json_schema", "json_schema": {...}} ਆਪਣੇ ਸਹੀ ਸਕੀਮਾ ਨਾਲ ਮੇਲ ਖਾਂਦਾ ਆਉਟਪੁੱਟ ਫੋਰਸ ਕਰੋ

ਸਟ੍ਰੀਮਿੰਗ

ਰੀਅਲ‑ਟਾਈਮ ਟੋਕਨ ਸਟ੍ਰੀਮਿੰਗ Server‑Sent Events ਨਾਲ ਐਨੇਬਲ ਕਰੋ ਤਾਂ ਜੋ UI ਤੁਰੰਤ ਜਵਾਬ ਦੇਵੇ।

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);
}
ਟਿਪ: ਸਟ੍ਰੀਮਿੰਗ ਜਵਾਬ Server‑Sent Events ਵਜੋਂ ਆਉਂਦੇ ਹਨ। ਹਰ ਚੰਕ ਵਿੱਚ ਡੈਲਟਾ ਨਾਲ ਅੰਸ਼ਿਕ ਸਮੱਗਰੀ ਹੁੰਦੀ ਹੈ।

ਵੈੱਬ ਖੋਜ

Shannon ਵਿੱਚ built‑in web_search ਫੰਕਸ਼ਨ ਹੈ ਜੋ ਆਪਣੇ‑ਆਪ ਉਪਲਬਧ ਹੈ।

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
ਪ੍ਰੋ ਟਿਪ: ਵੈੱਬ ਸਰਚ ਨਤੀਜਿਆਂ ਵਿੱਚ ਸਿਟੇਸ਼ਨ ਹੁੰਦੇ ਹਨ। Shannon ਆਪਣੇ ਆਪ ਸਰੋਤਾਂ ਦਾ ਜ਼ਿਕਰ ਕਰੇਗਾ।

Anthropic

Shannon Anthropic Messages API ਫਾਰਮੈਟ ਨੂੰ ਵੀ ਸਹਾਇਤਾ ਕਰਦਾ ਹੈ।

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);
ਲਾਜ਼ਮੀ ਹੈਡਰ: Anthropic ਫਾਰਮੈਟ ਲਈ anthropic-version: 2023-06-01 ਲਾਜ਼ਮੀ ਹੈ।

CLI Coding Agents

NEW

Use Shannon as the AI backend for popular CLI coding agents. Read files, edit code, run tests — all powered by Shannon's API.

CLI Claude Code

Anthropic's official CLI coding agent. Point it at Shannon to use as your AI backend for reading, editing, and running code directly in your terminal.

ANTHROPIC_BASE_URL=https://api.shannon-ai.com ANTHROPIC_API_KEY=sk-YOUR_KEY claude --bare
ਡੌਕਸ ਵੇਖੋ ->
CLI Codex CLI

OpenAI's open-source coding agent. Uses the Responses API for multi-turn tool use, file editing, and shell commands — all routed through Shannon.

OPENAI_BASE_URL=https://api.shannon-ai.com/v1 OPENAI_API_KEY=sk-YOUR_KEY codex
ਡੌਕਸ ਵੇਖੋ ->

Claude Code

Anthropic's official CLI coding agent. Set two environment variables and launch with --bare to skip Anthropic account login.

Bash
# Install Claude Code (requires Node.js 18+)
npm install -g @anthropic-ai/claude-code

# Connect to Shannon AI as backend
export ANTHROPIC_BASE_URL=https://api.shannon-ai.com
export ANTHROPIC_API_KEY=sk-YOUR_API_KEY

# Launch Claude Code in bare mode (no Anthropic account needed)
claude --bare

# Or run a one-shot command
claude --bare -p "Explain this codebase"

# Claude Code will use Shannon's Anthropic-compatible API
# for all AI operations: reading files, editing code,
# running tests, and multi-turn tool use.
Shell Config
# Alternative: set env vars permanently in your shell profile
# ~/.bashrc or ~/.zshrc

export ANTHROPIC_BASE_URL=https://api.shannon-ai.com
export ANTHROPIC_API_KEY=sk-YOUR_API_KEY

# Then just run:
claude --bare

# Supported features through Shannon:
# - Multi-turn conversations with full context
# - File reading and editing (tool use)
# - Shell command execution
# - Streaming responses
# - All Claude Code slash commands (/compact, /clear, etc.)

Codex CLI

OpenAI's open-source coding agent. Uses the Responses API for multi-turn tool use, file editing, and shell commands.

Bash
# Install Codex CLI
npm install -g @openai/codex

# Connect to Shannon AI as backend
export OPENAI_BASE_URL=https://api.shannon-ai.com/v1
export OPENAI_API_KEY=sk-YOUR_API_KEY

# Launch Codex
codex

# Or run a one-shot command
codex "fix the bug in main.py"

# Codex uses the Responses API (POST /v1/responses)
# Shannon handles tool calls including:
# - Reading and writing files
# - Running shell commands
# - Multi-turn function calling
Shell Config
# Alternative: set env vars permanently
# ~/.bashrc or ~/.zshrc

export OPENAI_BASE_URL=https://api.shannon-ai.com/v1
export OPENAI_API_KEY=sk-YOUR_API_KEY

# Then just run:
codex

# Supported features through Shannon:
# - Responses API with full tool use
# - Function calling (file read/write, shell exec)
# - Streaming with real-time output
# - Multi-turn conversations
# - All Codex approval modes (suggest, auto-edit, full-auto)
How It Works: Both tools send standard API requests (Anthropic Messages or OpenAI Responses) to Shannon. Shannon routes them through Gemini with full tool-use support. No Anthropic or OpenAI account needed — just your Shannon API key.

SDKs

ਅਨੁਕੂਲ

ਕੋਈ ਵੀ OpenAI ਜਾਂ Anthropic SDK ਵਰਤੋ — ਸਿਰਫ base URL ਬਦਲੋ।

OpenAI‑ਅਨੁਕੂਲ SDKs

SDK Python

ਆਧਿਕਾਰਿਕ OpenAI Python SDK - Shannon ਨਾਲ ਕੰਮ ਕਰਦਾ ਹੈ

pip install openai
ਡੌਕਸ ਵੇਖੋ ->
SDK JavaScript / TypeScript

ਆਧਿਕਾਰਿਕ OpenAI Node.js SDK - Shannon ਨਾਲ ਕੰਮ ਕਰਦਾ ਹੈ

npm install openai
ਡੌਕਸ ਵੇਖੋ ->
SDK Go

OpenAI‑ਅਨੁਕੂਲ APIs ਲਈ ਕਮਿਊਨਟੀ Go ਕਲਾਇੰਟ

go get github.com/sashabaranov/go-openai
ਡੌਕਸ ਵੇਖੋ ->
SDK Ruby

OpenAI‑ਅਨੁਕੂਲ APIs ਲਈ ਕਮਿਊਨਟੀ Ruby ਕਲਾਇੰਟ

gem install ruby-openai
ਡੌਕਸ ਵੇਖੋ ->
SDK PHP

OpenAI‑ਅਨੁਕੂਲ APIs ਲਈ ਕਮਿਊਨਟੀ PHP ਕਲਾਇੰਟ

composer require openai-php/client
ਡੌਕਸ ਵੇਖੋ ->
SDK Rust

OpenAI‑ਅਨੁਕੂਲ APIs ਲਈ Async Rust ਕਲਾਇੰਟ

cargo add async-openai
ਡੌਕਸ ਵੇਖੋ ->

Anthropic‑ਅਨੁਕੂਲ SDKs

SDK Python (Anthropic)

ਆਧਿਕਾਰਿਕ Anthropic Python SDK - Shannon ਨਾਲ ਕੰਮ ਕਰਦਾ ਹੈ

pip install anthropic
ਡੌਕਸ ਵੇਖੋ ->
SDK TypeScript (Anthropic)

ਆਧਿਕਾਰਿਕ Anthropic TypeScript SDK - Shannon ਨਾਲ ਕੰਮ ਕਰਦਾ ਹੈ

npm install @anthropic-ai/sdk
ਡੌਕਸ ਵੇਖੋ ->

ਗਲਤੀਆਂ

Shannon ਮਿਆਰੀ HTTP ਸਟੇਟਸ ਕੋਡ ਵਰਤਦਾ ਹੈ ਅਤੇ ਵਿਸਥਾਰਿਕ ਗਲਤੀ ਸੁਨੇਹੇ ਵਾਪਸ ਕਰਦਾ ਹੈ।

400 ਗਲਤ ਰਿਕਵੇਸਟ ਗਲਤ ਰਿਕਵੇਸਟ ਫਾਰਮੈਟ ਜਾਂ ਪੈਰਾਮੀਟਰ
401 ਗੈਰ‑ਅਧਿਕ੍ਰਿਤ ਗਲਤ ਜਾਂ ਗੁੰਮ API ਕੀ
402 ਕੋਟਾ ਪਾਰ ਟੋਕਨ ਜਾਂ ਸਰਚ ਕੋਟਾ ਪਾਰ ਹੋ ਗਿਆ
429 ਰੇਟ ਲਿਮਿਟ ਬਹੁਤ ਸਾਰੀਆਂ ਰਿਕਵੇਸਟਾਂ, ਥੋੜ੍ਹਾ ਹੌਲੀ ਕਰੋ
500 ਸਰਵਰ ਐਰਰ ਅੰਦਰੂਨੀ ਗੜਬੜ, ਬਾਅਦ ਵਿੱਚ ਕੋਸ਼ਿਸ਼ ਕਰੋ

ਐਰਰ ਰਿਸਪਾਂਸ ਫਾਰਮੈਟ

ਐਰਰ ਰਿਸਪਾਂਸ
{
  "error": {
    "message": "Invalid API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

ਬਦਲਾਅ ਲੌਗ

LOG

Shannon API ਲਈ ਤਾਜ਼ਾ ਅਪਡੇਟ ਅਤੇ ਸੁਧਾਰ।

v2.2.0
2026-03-28
  • ਨਵਾਂ Claude Code support — use Shannon as your Anthropic backend for the official CLI coding agent
  • ਨਵਾਂ Codex CLI support — full Responses API with multi-turn tool use for OpenAI's coding agent
  • ਸੁਧਾਰਿਆ Anthropic streaming format fixes — proper content_block lifecycle, tool_use deltas, toolu_ prefixes
  • ਸੁਧਾਰਿਆ Schema sanitization for Gemini — strips $schema, additionalProperties, $ref and other unsupported fields from tool schemas
v2.1.0
2025-01-03
  • ਨਵਾਂ Claude Code CLI ਲਈ shannon-coder-1 ਮਾਡਲ ਸ਼ਾਮਲ ਕੀਤਾ
  • ਨਵਾਂ Coder ਮਾਡਲ ਲਈ ਕਾਲ‑ਅਧਾਰਿਤ ਕੋਟਾ ਸਿਸਟਮ
  • ਸੁਧਾਰਿਆ ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ ਦੀ ਭਰੋਸੇਯੋਗਤਾ ਸੁਧਾਰੀ
v2.0.0
2024-12-15
  • ਨਵਾਂ Anthropic Messages API ਨਾਲ ਅਨੁਕੂਲਤਾ ਸ਼ਾਮਲ
  • ਨਵਾਂ ਮਲਟੀ‑ਟਰਨ ਟੂਲ ਐਗਜ਼ਿਕਿਊਸ਼ਨ (10 iterations ਤੱਕ)
  • ਨਵਾਂ JSON Schema ਰਿਸਪਾਂਸ ਫਾਰਮੈਟ ਸਪੋਰਟ
  • ਸੁਧਾਰਿਆ ਉੱਤਮ ਸਿਟੇਸ਼ਨਾਂ ਨਾਲ ਵੈੱਬ ਸਰਚ ਸੁਧਾਰੀ
v1.5.0
2024-11-20
  • ਨਵਾਂ ਜਟਿਲ ਰੀਜ਼ਨਿੰਗ ਲਈ shannon-deep-dapo ਮਾਡਲ ਜੋੜਿਆ
  • ਨਵਾਂ Built‑in web_search ਫੰਕਸ਼ਨ
  • ਸੁਧਾਰਿਆ ਸਟ੍ਰੀਮਿੰਗ ਜਵਾਬਾਂ ਲਈ ਲੇਟੈਂਸੀ ਘਟਾਈ
v1.0.0
2024-10-01
  • ਨਵਾਂ ਸ਼ੁਰੂਆਤੀ API ਰਿਲੀਜ਼
  • ਨਵਾਂ OpenAI‑ਅਨੁਕੂਲ chat completions endpoint
  • ਨਵਾਂ ਫੰਕਸ਼ਨ ਕਾਲਿੰਗ ਸਪੋਰਟ
  • ਨਵਾਂ Server‑Sent Events ਰਾਹੀਂ ਸਟ੍ਰੀਮਿੰਗ

API ਕੀ

ਐਕਸੇਸ
OpenAI ਕਾਲਾਂ ਲਈ Bearer ਟੋਕਨ ਜਾਂ X-API-Key + anthropic-version ਵਰਤੋ।
YOUR_API_KEY
ਆਪਣੀ API ਕੀ ਪ੍ਰਾਪਤ ਕਰੋ

ਆਪਣੀ API ਕੀ ਗੁਪਤ ਰੱਖੋ। ਦੁਬਾਰਾ ਬਣਾਉਣ ਨਾਲ ਨਵੀਂ ਕੀ ਬਣਦੀ ਹੈ ਅਤੇ ਪੁਰਾਣੀ ਰੱਦ ਹੁੰਦੀ ਹੈ।

ਵਰਜ਼ਨ: 1
ਆਖਰੀ ਵਾਰ ਰੋਟੇਟ: ਕਦੇ ਨਹੀਂ
ਆਖਰੀ ਵਰਤੋਂ: ਕਦੇ ਨਹੀਂ

ਵਰਤੋਂ

ਜਦੋਂ ਤੁਸੀਂ ਸਾਈਨ ਇਨ ਹੋਵੇ, ਇਸ ਪੇਜ ’ਤੇ ਟੋਕਨ ਅਤੇ ਸਰਚ ਦੀ ਖਪਤ ਵੇਖੋ।

-- API ਕਾਲਾਂ
-- ਵਰਤੇ ਟੋਕਨ

Shannon Coder (shannon-coder-1)

Shannon Coder (shannon-coder-1) ਲਈ ਕਾਲ‑ਅਧਾਰਿਤ ਕੋਟਾ। ਹਰ 4 ਘੰਟਿਆਂ ਬਾਅਦ ਰੀਸੈਟ ਹੁੰਦਾ ਹੈ।

0 ਵਰਤੀਆਂ ਕਾਲਾਂ
0 ਬਾਕੀ ਕਾਲਾਂ

ਤਿਆਰ ਹੋ?

ਆਪਣੀ API ਕੀ ਲਓ ਅਤੇ ਅੱਜ ਹੀ Shannon AI ਨਾਲ ਬਣਾਉਣਾ ਸ਼ੁਰੂ ਕਰੋ।

API ਕੀ ਬਣਾਓ ਡੌਕਸ ਵੇਖੋ

ਲੋਕਪ੍ਰਿਯ ਖੋਜਾਂ:

ਹੋਰ ਕੀਵਰਡ ਅਜ਼ਮਾਓ
ਨੇਵੀਗੇਟ ਕਰੋ: ↑ ↓ ਚੁਣੋ: Enter ਬੰਦ ਕਰੋ: Esc