Athsholáthar Buail Isteach
ComhoiriúnachOibríonn sé le OpenAI agus SDKanna Antraipeacha. Just a athrú ar an URL bonn.
Tá gach teanga comhionann. Roghnaigh an ceann is mian leat brabhsáil isteach.
API AI comhoiriúnach le OpenAI & Anthropic le glaonna feidhme, cuardach gréasáin agus aschuir struchtúrtha.
Gach rud a theastaíonn uait a sheoladh le OpenAI na Sionainne agus API comhoiriúnach Anthropic.
https://api.shannon-ai.com/v1/chat/completions Bain úsáid as an Chat Críochnaithe API le glaonna feidhme agus sruthú.
https://api.shannon-ai.com/v1/messages Formáid Claude Messages le huirlisí agus ceanntásc leagan antraipeach.
Údarú: Iompróir <d'eochair> Nó X-API-Key le leagan antraipeach le haghaidh glaonna ar stíl Claude.
Doiciméid phoiblí - Teastaíonn eochair chun glaoch Sruthú, glaonna feidhm, aschuir struchtúrtha, cuardach gréasáin.
Athsholáthar buail isteach do OpenAI agus APIanna Antraipeacha le tacaíocht dhúchasach d’uirlisí, aschuir struchtúrtha, agus cuardach gréasáin ionsuite.
Oibríonn sé le OpenAI agus SDKanna Antraipeacha. Just a athrú ar an URL bonn.
Sainmhínigh uirlisí, lig do Shannon glaoch orthu. Tacaíonn sé le modhanna uathoibríocha, éigeantais agus gan aon mhodh.
Cuardach gréasáin fíor-ama le luanna foinse. Ar fáil go huathoibríoch.
Modh JSON agus JSON Forghníomhú scéimre le haghaidh eastóscadh sonraí iontaofa.
Lúba forghníomhaithe feidhm uathoibríoch. Suas le 10 atriall in aghaidh an iarratais.
Imeachtaí a sheol an freastalaí le haghaidh sruthú comharthaí fíor-ama.
Cuir tús leis i dtrí chéim. Léiríonn Shannon cliaint OpenAI agus Anthropic.
Úsáid críochphointe OpenAI-comhoiriúnach.
https://api.shannon-ai.com/v1/chat/completions Úsáid údar Iompróra sa cheanntásc Údaraithe.
Roghnaigh teanga agus babhtáil i d'eochair.
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) 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); 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 -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
}
} Tástáil API na Sionainne go díreach i do bhrabhsálaí. Tóg d'iarratas, rith é, agus féach ar an bhfreagra i bhfíor-am.
Switch across OpenAI Chat Completions, Responses, and Anthropic Messages without leaving the playground.
Run real requests, inspect raw JSON, and view stream events from the same operator console.
Signed-in users can pull their Shannon API key straight into the dedicated playground workspace.
/ga/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.
Teastaíonn fíordheimhniú le gach iarratas API ag baint úsáid as d’eochair Shannon API.
Authorization: Bearer YOUR_API_KEY X-API-Key: YOUR_API_KEY
anthropic-version: 2023-06-01 Tairgeann Shannon samhlacha iolracha optamaithe le haghaidh cásanna úsáide éagsúla.
shannon-1.6-lite Shannon 1.6 Lite Freagraí gasta, éifeachtacha ar thascanna laethúla
shannon-1.6-pro Shannon 1.6 Pro Réasúnaíocht chun cinn maidir le fadhbanna casta
shannon-2-lite Shannon 2 Lite
shannon-2-pro Shannon 2 Pro
shannon-coder-1 Shannon Coder Optamaithe le haghaidh Claude Code CLI le cuóta bunaithe ar ghlaonna
Sainmhínigh uirlisí ar féidir le Sionainn glaoch orthu chun gníomhartha a dhéanamh nó chun faisnéis a aisghabháil.
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}") 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" Cinneann an tsamhail cibé an nglaoitear feidhm (réamhshocraithe) "none" Díchumasaigh an fheidhm atá ag glaoch ar an iarratas seo {"type": "function", "function": {"name": "..."}} Cuir glaoch ar fheidhm shonrach i bhfeidhm {
"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"
}
]
} Cuir iallach ar Shannon freagra a thabhairt le JSON bailí a thagann le do scéimre.
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"} 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"} Cuir i bhfeidhm aschur bailí JSON (gan scéimre ar leith) {"type": "json_schema", "json_schema": {...}} Cuir i bhfeidhm an t-aschur atá ag teacht le do scéimre beacht Cumasaigh sruthú dearbhán fíor-ama le Imeachtaí Seolta Freastalaí le haghaidh UI freagrúil.
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) 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);
} Áiríonn Shannon feidhm cuardaigh gréasáin ionsuite atá ar fáil go huathoibríoch.
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 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 Tacaíonn Shannon freisin le formáid API Teachtaireachtaí Anthropic.
https://api.shannon-ai.com/v1/messages 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) 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); Bain úsáid as aon OpenAI nó SDK Anthropic - níl le déanamh ach an bunUR a athrú.
Oifigiúla OpenAI Python SDK - oibríonn sé le Shannon
pip install openai Oifigiúla OpenAI Node.js SDK - oibríonn sé le Sionainn
npm install openai Cliant Community Go le haghaidh API atá comhoiriúnach le OpenAI
go get github.com/sashabaranov/go-openai Cliant Community Ruby le haghaidh API atá comhoiriúnach le OpenAI
gem install ruby-openai Cliant PHP pobail le haghaidh API atá comhoiriúnach le OpenAI
composer require openai-php/client Cliant Async Rust le haghaidh API atá comhoiriúnach le OpenAI
cargo add async-openai Oifigiúla Antropic Python SDK - oibríonn sé le Shannon
pip install anthropic Oifigiúla Anthropic TypeScript SDK - oibríonn sé le Sionainn
npm install @anthropic-ai/sdk Úsáideann Shannon cóid stádais chaighdeánacha HTTP agus cuireann sí teachtaireachtaí earráide mionsonraithe ar ais.
{
"error": {
"message": "Invalid API key provided",
"type": "authentication_error",
"code": "invalid_api_key"
}
} Nuashonruithe agus feabhsuithe le déanaí ar API na Sionainne.
YOUR_API_KEY Coinnigh d'eochair API faoi rún. Cruthaíonn athghiniúint eochair nua agus neamhbhailítear an seancheann.
Féach ar thomhaltas chomhartha agus cuardaigh ar an leathanach seo agus tú sínithe isteach ar do chuntas.
Cuóta bunaithe ar ghlaonna do Shannon Coder (shannon-coder-1). Athshocraigh gach 4 uair an chloig.
Faigh d'eochair API agus cuir tús le tógáil le Shannon AI inniu.
Cuardach coitianta: