டிராப்-இன் மாற்று
இணக்கமானதுOpenAI மற்றும் Anthropic SDKகளுடன் வேலை செய்கிறது. அடிப்படை URL ஐ மட்டும் மாற்றவும்.
எல்லா மொழிகளும் சமம். நீங்கள் உலாவ விரும்பும் ஒன்றைத் தேர்ந்தெடுக்கவும்.
செயல்பாட்டு அழைப்பு, வலைத் தேடல் மற்றும் கட்டமைக்கப்பட்ட வெளியீடுகளுடன் OpenAI & Anthropic இணக்கமான AI API.
ஷானனின் OpenAI மற்றும் Anthropic இணக்கமான API உடன் நீங்கள் அனுப்ப வேண்டிய அனைத்தும்.
https://api.shannon-ai.com/v1/chat/completions செயல்பாடு அழைப்பு மற்றும் ஸ்ட்ரீமிங்குடன் Chat Completions API ஐப் பயன்படுத்தவும்.
https://api.shannon-ai.com/v1/messages கருவிகள் மற்றும் மானுட-பதிப்பு தலைப்புடன் கிளாட் செய்திகளின் வடிவம்.
அங்கீகாரம்: தாங்குபவர் <உங்கள்-விசை> அல்லது கிளாட் பாணி அழைப்புகளுக்கான மானுட-பதிப்புடன் கூடிய X-API-Key.
பொது ஆவணம் - அழைக்க விசை தேவை ஸ்ட்ரீமிங், செயல்பாட்டு அழைப்பு, கட்டமைக்கப்பட்ட வெளியீடுகள், வலைத் தேடல்.
கருவிகள், கட்டமைக்கப்பட்ட வெளியீடுகள் மற்றும் உள்ளமைக்கப்பட்ட இணையத் தேடலுக்கான சொந்த ஆதரவுடன் OpenAI மற்றும் Anthropic APIகளுக்கான டிராப்-இன் மாற்றீடு.
OpenAI மற்றும் Anthropic SDKகளுடன் வேலை செய்கிறது. அடிப்படை URL ஐ மட்டும் மாற்றவும்.
கருவிகளை வரையறுக்கவும், ஷானன் அவற்றை அழைக்கட்டும். தானாக, கட்டாயப்படுத்தப்பட்ட மற்றும் எதுவும் இல்லாத முறைகளை ஆதரிக்கிறது.
மூல மேற்கோள்களுடன் நிகழ்நேர வலைத் தேடல். தானாகவே கிடைக்கும்.
நம்பகமான தரவைப் பிரித்தெடுப்பதற்கான JSON பயன்முறை மற்றும் JSON திட்ட அமலாக்கம்.
தானியங்கி செயல்பாடு செயல்படுத்தல் சுழல்கள். ஒரு கோரிக்கைக்கு 10 மறு செய்கைகள் வரை.
நிகழ்நேர டோக்கன் ஸ்ட்ரீமிங்கிற்காக சேவையகம் அனுப்பிய நிகழ்வுகள்.
மூன்று படிகளில் தொடங்கவும். ஷானன் OpenAI மற்றும் Anthropic வாடிக்கையாளர்களை பிரதிபலிக்கிறது.
OpenAI-இணக்கமான இறுதிப்புள்ளியைப் பயன்படுத்தவும்.
https://api.shannon-ai.com/v1/chat/completions அங்கீகாரத் தலைப்பில் தாங்கி அங்கீகாரத்தைப் பயன்படுத்தவும்.
ஒரு மொழியைத் தேர்ந்தெடுத்து உங்கள் விசையை மாற்றவும்.
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
}
} உங்கள் உலாவியில் நேரடியாக ஷானன் API ஐ சோதிக்கவும். உங்கள் கோரிக்கையை உருவாக்கவும், அதை இயக்கவும் மற்றும் பதிலை நிகழ்நேரத்தில் பார்க்கவும்.
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.
/ta/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.
உங்கள் Shannon API விசையைப் பயன்படுத்தி அனைத்து API கோரிக்கைகளுக்கும் அங்கீகாரம் தேவை.
Authorization: Bearer YOUR_API_KEY X-API-Key: YOUR_API_KEY
anthropic-version: 2023-06-01 ஷானன் வெவ்வேறு பயன்பாட்டு நிகழ்வுகளுக்கு உகந்த பல மாதிரிகளை வழங்குகிறது.
shannon-1.6-lite Shannon 1.6 Lite அன்றாட பணிகளுக்கு விரைவான, திறமையான பதில்கள்
shannon-1.6-pro Shannon 1.6 Pro சிக்கலான சிக்கல்களுக்கான மேம்பட்ட பகுத்தறிவு
shannon-2-lite Shannon 2 Lite
shannon-2-pro Shannon 2 Pro
shannon-coder-1 Shannon Coder அழைப்பு அடிப்படையிலான ஒதுக்கீட்டுடன் Claude Code CLIக்கு உகந்ததாக உள்ளது
செயல்களைச் செய்ய அல்லது தகவலைப் பெற ஷானன் அழைக்கக்கூடிய கருவிகளை வரையறுக்கவும்.
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" ஒரு செயல்பாட்டை அழைக்க வேண்டுமா என்பதை மாதிரி தீர்மானிக்கிறது (இயல்புநிலை) "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"
}
]
} உங்கள் திட்டத்துடன் பொருந்தக்கூடிய சரியான JSON உடன் பதிலளிக்க ஷானனை கட்டாயப்படுத்தவும்.
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"} செல்லுபடியாகும் JSON வெளியீடு (குறிப்பிட்ட திட்டம் இல்லை) {"type": "json_schema", "json_schema": {...}} உங்களின் சரியான திட்டத்துடன் பொருந்துமாறு கட்டாய வெளியீடு பதிலளிக்கக்கூடிய UIகளுக்கு, சர்வர் அனுப்பிய நிகழ்வுகளுடன் நிகழ்நேர டோக்கன் ஸ்ட்ரீமிங்கை இயக்கவும்.
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);
} Shannon தானாகக் கிடைக்கும் ஒரு உள்ளமைக்கப்பட்ட web_search செயல்பாட்டை உள்ளடக்கியது.
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 ஷானன் ஆந்த்ரோபிக்கின் மெசேஜஸ் ஏபிஐ வடிவமைப்பையும் ஆதரிக்கிறார்.
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); ஏதேனும் OpenAI அல்லது Anthropic SDK ஐப் பயன்படுத்தவும் - அடிப்படை URL ஐ மாற்றவும்.
அதிகாரப்பூர்வ OpenAI பைதான் SDK - ஷானனுடன் வேலை செய்கிறது
pip install openai அதிகாரப்பூர்வ OpenAI Node.js SDK - ஷானனுடன் வேலை செய்கிறது
npm install openai OpenAI-இணக்கமான APIகளுக்கான Community Go கிளையன்ட்
go get github.com/sashabaranov/go-openai OpenAI-இணக்கமான APIகளுக்கான சமூக ரூபி கிளையன்ட்
gem install ruby-openai OpenAI-இணக்கமான APIகளுக்கான சமூக PHP கிளையன்ட்
composer require openai-php/client OpenAI-இணக்கமான APIகளுக்கான Async Rust கிளையன்ட்
cargo add async-openai அதிகாரப்பூர்வ மானுடவியல் பைதான் SDK - ஷானனுடன் வேலை செய்கிறது
pip install anthropic அதிகாரப்பூர்வ ஆந்த்ரோபிக் டைப்ஸ்கிரிப்ட் SDK - ஷானனுடன் வேலை செய்கிறது
npm install @anthropic-ai/sdk ஷானன் நிலையான HTTP நிலைக் குறியீடுகளைப் பயன்படுத்துகிறது மற்றும் விரிவான பிழை செய்திகளை வழங்குகிறது.
{
"error": {
"message": "Invalid API key provided",
"type": "authentication_error",
"code": "invalid_api_key"
}
} Shannon APIக்கான சமீபத்திய புதுப்பிப்புகள் மற்றும் மேம்பாடுகள்.
YOUR_API_KEY உங்கள் API விசையை ரகசியமாக வைத்திருங்கள். மறுஉருவாக்கம் ஒரு புதிய விசையை உருவாக்குகிறது மற்றும் பழையதை செல்லாததாக்குகிறது.
உங்கள் கணக்கில் உள்நுழைந்திருக்கும்போது இந்தப் பக்கத்தில் டோக்கன் மற்றும் தேடல் நுகர்வுகளைப் பார்க்கவும்.
ஷானன் கோடருக்கான அழைப்பு அடிப்படையிலான ஒதுக்கீடு (shannon-coder-1). ஒவ்வொரு 4 மணிநேரமும் மீட்டமைக்கப்படும்.
உங்கள் API விசையைப் பெற்று, இன்றே Shannon AI உடன் உருவாக்கத் தொடங்குங்கள்.
பிரபலமான தேடல்கள்: