CHATYAMINI

API reference

Version 1 preview · authenticated text streaming.

Authentication

Send an unexpired ChatYamini Supabase session access token in the Authorization: Bearer header. Obtain the session through your approved application sign-in flow. Tokens expire; refresh them through that flow. There is no permanent API-key issuance in this release.

This endpoint is intended for same-origin application use or authorized server clients. Cross-origin browser access is not enabled. Never use a service-role key as an end-user token.

POST /api/v1/chat

Content-Type must be application/json. Maximum body size is 64 KiB. Required fields: message (1–8,000 characters) and conversationId (8–64 letters, digits, underscores or hyphens).

Optional fields: model (swift, smart or expert; defaults to swift), history (up to 16 user/assistant messages, each up to 8,000 characters) and language (up to 35 characters, for example en or fr). History is supplied by your client. Attachments and web search are not part of this text API.

curl -N https://chatyamini.com/api/v1/chat   -H "Authorization: Bearer $CHATYAMINI_ACCESS_TOKEN"   -H "Content-Type: application/json"   --data '{"conversationId":"example-chat-001","message":"Hello","model":"swift","language":"en"}'

Response and cancellation

A successful response is UTF-8 text streamed as it becomes available, not JSON or server-sent events. Read the response incrementally. Abort your HTTP request to cancel. A connection can fail after headers are sent, so handle incomplete output and allow a user-initiated retry.

Requests count toward the account quota. Do not automatically retry a completed request: that may generate another answer and consume more usage. This version does not support idempotency keys.

Errors

Before streaming starts, errors use a JSON error object with code and message. Handle the HTTP status before reading a text stream.

StatusMeaningAction
400 / 413 / 415Invalid or oversized body, or wrong media typeCorrect the request
401Missing, expired or invalid sessionSign in again or refresh the session
402Plan allowance exhausted or upgrade requiredReview account plans or start a new Free conversation where applicable
403Account or mode access deniedReview account permissions
429Usage limit reachedReview account limits
500 / 502 / 503 / 504Service or provider unavailableCheck the service and retry later

Service information

GET /api/v1/openapi describes the contract. GET /api/status reports application configuration only; it is not an inference uptime guarantee.

For files, billing and Live Assistant, use the supported web interface. Those internal routes are not included in this public versioned contract.