# PhoenixKitAI v0.4.0 - Table of Contents

> AI module for PhoenixKit — endpoints, prompts, completions, and usage tracking

## Modules

- [PhoenixKitAI](PhoenixKitAI.md): Main context for PhoenixKit AI system.
- [PhoenixKitAI.AIModel](PhoenixKitAI.AIModel.md): Struct representing a normalized AI model from the OpenRouter API.
- [PhoenixKitAI.Completion](PhoenixKitAI.Completion.md): OpenRouter completion client for making AI API calls.
- [PhoenixKitAI.Components.AITranslate](PhoenixKitAI.Components.AITranslate.md): Shared AI-translation UI for multilang form LiveViews — the
publishing/projects-style trigger button + modal, on top of core's
`PhoenixKitAI.Translations` pipeline.
- [PhoenixKitAI.Components.AITranslate.Embed](PhoenixKitAI.Components.AITranslate.Embed.md): Host-side wiring for the AI-translate modal — `use` this in a form
LiveView and it injects the boilerplate that every consumer of
`PhoenixKitAI.Components.AITranslate.FormGlue` was hand-duplicating
- [PhoenixKitAI.Components.AITranslate.FormBinding](PhoenixKitAI.Components.AITranslate.FormBinding.md): The small storage-specific contract a form LiveView supplies to the
shared AI-translate glue (`PhoenixKitAI.Components.AITranslate.FormGlue`).
- [PhoenixKitAI.Components.AITranslate.FormGlue](PhoenixKitAI.Components.AITranslate.FormGlue.md): Shared LiveView glue for the AI-translate modal — the stateful counterpart
to the render-only `PhoenixKitAI.Components.AITranslate` components.
- [PhoenixKitAI.Endpoint](PhoenixKitAI.Endpoint.md): AI endpoint schema for PhoenixKit AI system.
- [PhoenixKitAI.Errors](PhoenixKitAI.Errors.md): Central mapping from error atoms (returned by the AI module's public
API) to translated human-readable strings.
- [PhoenixKitAI.OpenRouterClient](PhoenixKitAI.OpenRouterClient.md): OpenRouter API client for PhoenixKit AI system.
- [PhoenixKitAI.Prompt](PhoenixKitAI.Prompt.md): AI prompt schema for PhoenixKit AI system.
- [PhoenixKitAI.Request](PhoenixKitAI.Request.md): AI request schema for PhoenixKit AI system.
- [PhoenixKitAI.Routes](PhoenixKitAI.Routes.md): Route module for PhoenixKit AI admin routes.
- [PhoenixKitAI.Translatable](PhoenixKitAI.Translatable.md): Behaviour a feature module implements to make a resource AI-translatable
through core's generic translation pipeline
(`PhoenixKitAI.TranslateWorker` +
`PhoenixKitAI.Translations`).
- [PhoenixKitAI.Translatables](PhoenixKitAI.Translatables.md): Discovery for AI-translatable adapters.
- [PhoenixKitAI.TranslateWorker](PhoenixKitAI.TranslateWorker.md): Generic Oban worker that translates one resource's fields into a single
target language, shared by every consumer module.
- [PhoenixKitAI.Translation](PhoenixKitAI.Translation.md): Generic AI translation helper. Translates a `%{field_name => text}`
map from `source_lang` to `target_lang` using PhoenixKitAI's endpoint
and prompt system, and parses the structured response back into the
same shape.
- [PhoenixKitAI.Translations](PhoenixKitAI.Translations.md): Orchestration for AI-driven translation — the shared layer every
feature module enqueues against instead of re-implementing its own
context + worker.
- [PhoenixKitAI.Web.AuthHelpers](PhoenixKitAI.Web.AuthHelpers.md): Per-LV actor-resolution helpers.
- [PhoenixKitAI.Web.EndpointForm](PhoenixKitAI.Web.EndpointForm.md): LiveView for creating and editing AI endpoints.
- [PhoenixKitAI.Web.Endpoints](PhoenixKitAI.Web.Endpoints.md): LiveView for AI endpoints management.
- [PhoenixKitAI.Web.Playground](PhoenixKitAI.Web.Playground.md): LiveView for testing AI endpoints and prompts.
- [PhoenixKitAI.Web.PromptForm](PhoenixKitAI.Web.PromptForm.md): LiveView for creating and editing AI prompts.
- [PhoenixKitAI.Web.Prompts](PhoenixKitAI.Web.Prompts.md): LiveView for AI prompts management.
- [PhoenixKitAI.Web.SortHelpers](PhoenixKitAI.Web.SortHelpers.md): Shared URL-param parsing for the AI admin LVs (`endpoints.ex`,
`prompts.ex`, plus the usage tab inside endpoints).

