Przejdź do głównej zawartości
Version: 1.0.0

AI SmartTalk Public API v1

Complete API documentation for AI SmartTalk platform.

Authentication

Flow:

  1. GET /api/oauth/aist/authorize - Start authorization (with PKCE for mobile)
  2. User logs in and selects chatModel
  3. POST /api/oauth/aist/token - Exchange code for access token
  4. Use access token directly with chat endpoints:
Authorization: Bearer <ACCESS_TOKEN>

That's it. The OAuth access token works directly with /api/chat, /api/chat/voice, etc.

Alternative: Anonymous (no auth required)

If the chatModel allows anonymous users, no token is needed.

Legacy: JWT with x-use-chatbot-auth

For integrations that exchange tokens via /api/auth/oauth:

Authorization: Bearer <JWT_TOKEN>
x-use-chatbot-auth: true

For API v1 endpoints (admin context):

  • Authorization: Bearer <API_TOKEN> - API token or OAuth access token
  • x-chat-model-id: <CHAT_MODEL_ID> - Required for most endpoints

Base Paths

Important: Different endpoint groups use different base paths:

  • Chat & Voice endpoints: /api/chat/* and /api/chat/voice*
  • Voice v1 endpoints: /api/v1/voice/*
  • All other v1 endpoints: /api/v1/*

Each endpoint specifies its correct server/base path.

Streaming Support

Chat and Voice endpoints support Server-Sent Events (SSE) for real-time streaming:

  • Add ?stream=true query parameter or stream: true in request body
  • Receive events: stream_start, token, tool_start, tool_end, agent_response, stream_end
  • Voice endpoints also emit: transcription, tts_start, tts_complete

See the Streaming API Implementation Guide for detailed examples with React hooks.

CORS

All endpoints support CORS for browser-based clients when properly authenticated.

Rate Limiting

Please implement reasonable rate limiting on your side. Excessive requests may be throttled.

Authentication

API Token (Bearer token or x-api-key header)

Security Scheme Type:

http

HTTP Authorization Scheme:

bearer

Contact

AI SmartTalk Support:

URL: https://aismarttalk.tech

Gotowy, aby podnieść swoje
doświadczenie użytkownika?

Wdrażaj asystentów AI, którzy zachwycają klientów i rozwijają się wraz z Twoją firmą.

zgodne z RODO