API Reference

Models

Complete guide to all available Yachtsy AI models and their specialized capabilities.

About our models

Yachtsy provides four specialized AI models, each optimized for different marine and sailing use cases. All models support real-time streaming and are accessible through the same OpenAI-compatible API.

Available Models

yachtsy-agent

General sailing assistant with intelligent routing

  • Type: Router-based with tool selection
  • Streaming: Chunked (optimized for mixed content)
  • Best For: General sailing questions, conversational assistance
  • Features: Automatically routes to specialized tools based on query type
response = client.chat.completions.create(
    model="yachtsy-agent",
    messages=[{"role": "user", "content": "How do I prepare for a long passage?"}]
)

yachtsy-deep-research-agent

Comprehensive research and analysis

  • Type: Direct LLM with structured analysis
  • Streaming: Token-by-token (real-time)
  • Best For: Market studies, competitive analysis, detailed investigations
  • Features: Executive summaries, market context, technical deep dives, recommendations
response = client.chat.completions.create(
    model="yachtsy-deep-research-agent",
    messages=[{"role": "user", "content": "Comprehensive analysis of Catalina 34 vs Hunter 34"}],
    stream=True
)

Response Structure:

  • Executive Summary
  • Detailed Analysis
  • Market Context
  • Technical Deep Dive
  • Research Sources & Methodology
  • Recommendations

yachtsy-listings-agent

Fast boat listings search

  • Type: Tool-based with LLM formatting
  • Streaming: Real-time formatting
  • Best For: Finding boats for sale, inventory search
  • Features: Searches 25,000+ listings, formatted results, price/location filtering
response = client.chat.completions.create(
    model="yachtsy-listings-agent", 
    messages=[{"role": "user", "content": "Find Beneteau 40 boats under $200k"}],
    stream=True
)

Data Sources:

  • SailboatListings.com
  • YachtWorld
  • BoatTrader
  • Regional brokers

yachtsy-survey-agent

Professional boat surveys and inspections

  • Type: Tool-based with vision analysis
  • Streaming: Real-time analysis
  • Best For: Boat condition assessment, survey reports, inspection analysis
  • Features: Image processing, condition evaluation, detailed reports
response = client.chat.completions.create(
    model="yachtsy-survey-agent",
    messages=[{"role": "user", "content": "Survey this Catalina 34 listing: https://example.com/listing"}],
    stream=True
)

Analysis Areas:

  • Hull condition
  • Rigging assessment
  • Engine evaluation
  • Electrical systems
  • Interior condition

Model Comparison

Featureyachtsy-agentdeep-researchlistingssurvey
Response Time5-15s15-30s1-3s10-25s
Streaming TypeChunkedToken-by-tokenReal-timeReal-time
Data SourcesMixedResearch DBsListings DBsVision + Web
Output FormatConversationalStructuredFormatted ListsDetailed Reports
Best Use CasesGeneral Q&AAnalysisBoat SearchInspections

Usage Examples

Research Analysis

curl -X POST https://api.yachtsy.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "yachtsy-deep-research-agent",
    "messages": [{"role": "user", "content": "Market analysis of 35-40ft cruising sailboats"}],
    "stream": true
  }'
curl -X POST https://api.yachtsy.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "yachtsy-listings-agent", 
    "messages": [{"role": "user", "content": "Catalina 34 boats in California under $50k"}],
    "stream": true
  }'

Boat Survey

curl -X POST https://api.yachtsy.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "yachtsy-survey-agent",
    "messages": [{"role": "user", "content": "Analyze this boat listing for potential issues"}],
    "stream": true
  }'

Streaming Performance

All models support optimized streaming with different characteristics:

Token-by-Token Streaming (Deep Research)

  • Latency: ~50ms per token
  • Experience: Text appears as AI generates it
  • Best For: Research analysis, detailed explanations

Real-Time Formatting (Listings/Survey)

  • Latency: ~5ms per chunk
  • Experience: Formatted content appears smoothly
  • Best For: Structured data, reports, listings

Chunked Streaming (General Agent)

  • Latency: ~10ms per chunk
  • Experience: Consistent word-group delivery
  • Best For: Conversational responses, mixed content

Authentication & API Keys

All models use the same authentication system:

Authorization: Bearer yk-user-{userId}-{randomBytes}

Key Features:

  • Per-user attribution and tracking
  • Usage analytics and billing integration
  • Firestore-based storage and management
  • Web interface for key creation and management

Error Handling

All models return consistent error formats:

{
  "error": {
    "message": "Invalid model specified",
    "type": "invalid_request_error", 
    "code": "model_not_found"
  }
}

Model-Specific Errors:

  • Deep Research: May timeout on extremely complex queries (90s limit)
  • Listings: May return empty results if no matches found
  • Survey: Requires valid listing URLs or image data
  • General: May route to unavailable tools in rare cases
Performance Tip: Use the most specific model for your use case. Direct models (deep-research, listings, survey) are faster than the general router-based agent.