Skip to content

Chat Endpoint

Public endpoint for AI-powered portfolio chat. No authentication required.

MethodEndpointDescription
POST/api/v1/chatSend chat message

POST /chat

Send a chat message and receive an AI response. The chat service includes input/output guardrails for content safety and PII protection.

Request Body

json
{
  "message": "Tell me about your TypeScript experience",
  "visitorId": "visitor-unique-id"
}
FieldTypeRequiredDescription
messagestringYesUser message (1-2000 chars)
visitorIdstringYesClient-generated visitor identifier (1-100 chars)

Query Parameters

ParameterTypeDefaultDescription
includeToolCallsbooleanfalseInclude tool call details in response

Response

json
{
  "sessionId": "sess_abc123",
  "message": {
    "id": "msg_xyz789",
    "role": "assistant",
    "content": "I have extensive experience with TypeScript...",
    "createdAt": "2025-01-25T10:00:00Z"
  },
  "tokensUsed": 150,
  "toolCalls": []
}

TIP

The toolCalls field is only included when includeToolCalls=true is passed as a query parameter.

Error Responses

  • 429 Too Many Requests - Rate limited
  • 502 Bad Gateway - LLM service unavailable

See Also

Released under the MIT License.