Logotipo de SHANNON A.I.
SHANNON A.I.
Charlar Precios API Investigación Empresa Pentest AI Startup Boost
Iniciar sesión
Plan y uso
Charlar Precios API Investigación Empresa Pentest AI Startup Boost Iniciar sesión Plan y uso

Elige tu idioma

Todos los idiomas son iguales. Elige en cuál quieres navegar.

Documentación de API

API de Shannon

API de IA compatible con OpenAI y Anthropic con llamadas a funciones, búsqueda web y salidas estructuradas.

Obtener tu clave API Probar Playground V2
Documentación
  • OV Resumen
  • CP Capacidades
  • QS Inicio rápido
  • PG Playground de API Nuevo
  • AU Autenticación
  • ML Modelos
  • FN Llamadas a funciones
  • JS Salidas estructuradas
  • SS Streaming
  • WS Búsqueda web integrada
  • AN Formato Anthropic
  • SD SDKs
  • ER Manejo de errores
  • CL Registro de cambios
  • AK Tu clave API
  • US Tu uso

Shannon AI API Documentation

Resumen

Docs públicas

Todo lo que necesitas para lanzar con la API compatible con OpenAI y Anthropic de Shannon.

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

Usa la API Chat Completions con function calling y streaming.

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

Formato Claude Messages con tools y cabecera anthropic-version.

Encabezados Autenticación
Autorización: Bearer <tu-clave>

O usa X-API-Key con anthropic-version para llamadas estilo Claude.

Access Status
Public docs - Key required to call

Streaming, function calling, salidas estructuradas y búsqueda web.

Checklist de lanzamiento
  • +
    Apunta tu SDK a Shannon
    Configura baseURL al endpoint de OpenAI o Anthropic de arriba.
    Setup
  • +
    Añade tu API key
    Usa Bearer para llamadas OpenAI o X-API-Key + anthropic-version.
    Security
  • +
    Activa tools y salidas estructuradas
    Soporta tools/functions de OpenAI, JSON schema y web_search integrado.
    Capacidades
  • +
    Supervisa el uso
    Consulta consumo de tokens y búsquedas en esta página al iniciar sesión.
    Analytics

Capacidades

OpenAI + Anthropic

Reemplazo directo de APIs OpenAI y Anthropic con soporte nativo de tools, salidas estructuradas y búsqueda web integrada.

AI

Reemplazo directo

Compatible

Funciona con los SDK de OpenAI y Anthropic. Solo cambia la URL base.

AI

Llamadas de funciones

Herramientas

Define herramientas y deja que Shannon las llame. Soporta modos auto, forzado y ninguno.

AI

Búsqueda web integrada

Búsqueda

Búsqueda web en tiempo real con citas de fuentes. Disponible automáticamente.

AI

Salidas estructuradas

JSON

Modo JSON y cumplimiento de JSON Schema para extracción fiable de datos.

AI

Herramientas multi‑turno

Agéntico

Bucles automáticos de ejecución de funciones. Hasta 10 iteraciones por solicitud.

AI

Streaming

Rápido

Eventos enviados por el servidor para streaming de tokens en tiempo real.

Inicio rápido

5 minutos

Empieza en tres pasos. Shannon refleja los clientes de OpenAI y Anthropic.

1

Configura tu URL base

Usa el endpoint compatible con OpenAI.

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

Añade tu clave API

Usa autenticación Bearer en el encabezado Authorization.

3

Envía tu primer mensaje

Elige un idioma y reemplaza con tu clave.

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

Formato de respuesta

Respuesta exitosa
{
  "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
  }
}

Playground de API

Nuevo

Prueba la API de Shannon directamente en tu navegador. Construye tu solicitud, ejecútala y ve la respuesta en tiempo real.

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.

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

Probar Playground V2 Obtener tu clave API

Autenticación

Todas las solicitudes API requieren autenticación con tu API key de Shannon.

OpenAI Format (Recommended)

HTTP
Authorization: Bearer YOUR_API_KEY

Formato Anthropic

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

Modelos

Shannon ofrece varios modelos optimizados para distintos casos de uso.

AI
shannon-1.6-lite Shannon 1.6 Lite

Fast, efficient responses for everyday tasks

Contexto 128K
Ideal para Chat, Q&A, Content Generation
AI
shannon-1.6-pro Shannon 1.6 Pro

Advanced reasoning for complex problems

Contexto 128K
Ideal para Analysis, Research, Complex Tasks
AI
shannon-2-lite Shannon 2 Lite

Contexto 128K
Ideal para
AI
shannon-2-pro Shannon 2 Pro

Contexto 128K
Ideal para
AI
shannon-coder-1 Shannon Coder

Optimized for Claude Code CLI with call-based quota

Contexto 128K
Ideal para Code Generation, Tool Use, CLI Integration
Call-based quota

Llamadas a funciones

Define tools that Shannon can call to perform actions or retrieve information.

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

Opciones de selección de herramienta

"auto" Model decides whether to call a function (default)
"none" Disable function calling for this request
{"type": "function", "function": {"name": "..."}} Force a specific function call

Respuesta de llamada de función

When model calls a 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"
    }
  ]
}

Salidas estructuradas

Force Shannon to respond with valid JSON that matches your 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" }

Opciones de formato de respuesta

{"type": "json_object"} Force valid JSON output (no specific schema)
{"type": "json_schema", "json_schema": {...}} Force output matching your exact schema

Streaming

Enable real-time token streaming with Server-Sent Events for responsive UIs.

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);
}
Consejo: Streaming responses arrive as Server-Sent Events. Each chunk contains a delta with partial content.

Búsqueda web integrada

Shannon includes a built-in web_search function that's automatically available.

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
Consejo pro: Los resultados de búsqueda web incluyen citas. Shannon citará fuentes automáticamente.

Formato Anthropic

Shannon también soporta el formato Messages API de Anthropic.

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);
Encabezado obligatorio: Anthropic format requires anthropic-version: 2023-06-01.

SDKs

Compatible

Use any OpenAI or Anthropic SDK - just change the base URL.

OpenAI-Compatible SDKs

SDK Python

Official OpenAI Python SDK - works with Shannon

pip install openai
View Docs ->
SDK JavaScript / TypeScript

Official OpenAI Node.js SDK - works with Shannon

npm install openai
View Docs ->
SDK Go

Community Go client for OpenAI-compatible APIs

go get github.com/sashabaranov/go-openai
View Docs ->
SDK Ruby

Community Ruby client for OpenAI-compatible APIs

gem install ruby-openai
View Docs ->
SDK PHP

Community PHP client for OpenAI-compatible APIs

composer require openai-php/client
View Docs ->
SDK Rust

Async Rust client for OpenAI-compatible APIs

cargo add async-openai
View Docs ->

Anthropic-Compatible SDKs

SDK Python (Anthropic)

Official Anthropic Python SDK - works with Shannon

pip install anthropic
View Docs ->
SDK TypeScript (Anthropic)

Official Anthropic TypeScript SDK - works with Shannon

npm install @anthropic-ai/sdk
View Docs ->

Manejo de errores

Shannon usa códigos de estado HTTP estándar y devuelve mensajes de error detallados.

400 Solicitud incorrecta Formato o parámetros de solicitud inválidos
401 No autorizado Clave API inválida o faltante
402 Cuota excedida Cuota de tokens o de búsqueda excedida
429 Límite de tasa Demasiadas solicitudes, reduce la velocidad
500 Error del servidor Error interno, reintenta más tarde

Formato de respuesta de error

Respuesta de error
{
  "error": {
    "message": "Invalid API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

Registro de cambios

LOG

Recent updates and improvements to the Shannon API.

v2.1.0
2025-01-03
  • Nuevo Added shannon-coder-1 model for Claude Code CLI integration
  • Nuevo Call-based quota system for Coder model
  • Improved Improved function calling reliability
v2.0.0
2024-12-15
  • Nuevo Added Anthropic Messages API compatibility
  • Nuevo Multi-turn tool execution (up to 10 iterations)
  • Nuevo JSON Schema response format support
  • Improved Enhanced web search with better citations
v1.5.0
2024-11-20
  • Nuevo Added shannon-deep-dapo model for complex reasoning
  • Nuevo Built-in web_search function
  • Improved Reduced latency for streaming responses
v1.0.0
2024-10-01
  • Nuevo Initial API release
  • Nuevo OpenAI-compatible chat completions endpoint
  • Nuevo Function calling support
  • Nuevo Streaming via Server-Sent Events

Tu clave API

Access
Usa Bearer para llamadas OpenAI o X-API-Key + anthropic-version.
YOUR_API_KEY
Obtener tu clave API

Mantén tu clave API en secreto. Regenerar crea una nueva clave e invalida la anterior.

Versión: 1
Última rotación: Nunca
Último uso: Nunca

Tu uso

Consulta consumo de tokens y búsquedas en esta página al iniciar sesión.

-- Llamadas API
-- Tokens usados

Shannon Coder (shannon-coder-1)

Cuota basada en llamadas para Shannon Coder (shannon-coder-1). Se restablece cada 4 horas.

0 Llamadas usadas
0 Llamadas restantes

¿Listo para construir?

Get your API key and start building with Shannon AI today.

Obtener tu clave API Ver precios

Búsquedas populares:

Prueba otras palabras clave
Navegar: ↑ ↓ Seleccionar: Enter Cerrar: Esc