Messages API v3
Messages API v3 is Funtimes's OpenAI-compatible generation endpoint for text and images.
Base URL:
https://msg.funtimes.technology
Use this API when you want synchronous chat or Responses API generations with Funtimes quota tracking, character prompts, configured knowledge context, streaming, fallback models, and usage attribution.
The older Messages API v2 docs cover the legacy /v2/completions text/audio flow. Use Messages API v3 for new OpenAI-compatible integrations.
Typical Flow
- Send an OpenAI-compatible request with a quota API key.
- Funtimes validates the API key, quota, and character access.
- Messages API v3 applies character prompts and configured knowledge context when available.
- The model response is returned directly or streamed.
- Usage is recorded automatically.
Features
- Chat Completions:
POST /v3/chat/completions - Responses API:
POST /v3/responses - Authentication:
Authorization: Bearer <quota_api_key>orX-API-Key: <quota_api_key> - Characters: Optional GitHub or inline characters under
metadata.funtimes.character - Knowledge context: Configured through GitHub or inline character settings
- Knowledge visibility: Responses API calls can include status messages and source items when knowledge context is used
- Fallback models: Optional top-level
fallback_modelfor supported requests - Reasoning controls: Optional
reasoningsettings for supported models - Streaming: Standard streaming responses for supported models
- Images: Send images to vision models, or generate them with an image model. See Images.
Important Considerations
important
metadata.funtimesmay contain onlycharacterandcharacter_params.metadata.funtimes.routing,metadata.funtimes.request_id, and unknownmetadata.funtimesfields are rejected.metadata.funtimesis Funtimes-only request metadata and is not part of the model conversation.- Knowledge context is configured in character settings, either in GitHub or inline.
- Request bodies are limited to 20 MB, including base64 images. Larger requests return
413. - Character
max_new_tokens, when present in old character schemas, is not used as the output-token limit. Use request-level token fields such asmax_completion_tokens,max_tokens, ormax_output_tokens.