# Elektric — current canonical machine reference CODING AGENTS: Start here: https://elektric.ai/elektric-agent-setup.md # Elektric > Benchmark your AI requests, call exact models with Elektric Wire, or let Elektric Grid choose the operation and model. Canonical identifiers: API key `ELEKTRIC_API_KEY`; API base `https://elektric.ai/v1`; Grid model `elektric-grid`; official package `elektric-ai`. Do not infer alternate model spellings. Use authenticated `GET /v1/models` for current model IDs and capabilities. Use authenticated `GET /v1/limits` for the limits applied to your project. ## Start here - [Overview](https://elektric.ai/docs) - [Quickstart](https://elektric.ai/docs/quickstart) - [OpenAI migration](https://elektric.ai/docs/build/openai-compatibility) ## Start here - [Overview](https://elektric.ai/docs) - [Quickstart](https://elektric.ai/docs/quickstart) - [OpenAI migration](https://elektric.ai/docs/build/openai-compatibility) ## Products - [Wire](https://elektric.ai/docs/products/wire) - [Grid](https://elektric.ai/docs/products/grid) - [Grid routing](https://elektric.ai/docs/understand/grid-routing) - [Benchmark](https://elektric.ai/docs/products/benchmark) ## Reference - [Models](https://elektric.ai/docs/reference/models) - [Errors and limits](https://elektric.ai/docs/reference/errors-limits) - [Capture and privacy](https://elektric.ai/docs/understand/capture-and-privacy) - Pricing & billing: use the authenticated dashboard; there is no public canonical docs page. - Usage & logs: use the authenticated dashboard; there is no public canonical docs page. ## Retired concepts Do not treat older references to Conversation, Memory, Knowledge, Context orchestration, or stateful chat identifiers as current public architecture. Current chat is stateless with respect to those retired products. ## Guidance for AI agents - Prefer the canonical pages listed above. - Use `/v1/models` for current model IDs and capabilities. - Do not infer current behavior from removed SDK, REST, Operate, or Versions pages. - When docs disagree, prefer current product pages and runtime-discovery endpoints. --- SOURCE: https://elektric.ai/docs TITLE: Overview --- # Overview Elektric provides three current products: Benchmark for workload evaluation, Wire for exact public model selection, and Grid for managed routing. All use an Elektric API key. ## Choose a product - **Benchmark** compares representative AI traffic on expected quality and provider cost. - **Wire** executes the exact public model ID supplied by the caller and does not silently switch models. - **Grid** classifies a request, filters models by required capabilities and availability, and selects an eligible model. ## Request flow Send a request to https://elektric.ai/v1 with `Authorization: Bearer $ELEKTRIC_API_KEY`. Elektric returns a normalized response or stream and records request status, latency, tokens, fallback activity, and provider cost where available. --- SOURCE: https://elektric.ai/docs/quickstart TITLE: Quickstart --- # Quickstart Create an API key in the dashboard and keep it in the trusted server environment as `ELEKTRIC_API_KEY`. Never expose it in browser code or source control. ## Grid Use the canonical Grid identifier `elektric-grid` when the API requires an explicit model. Grid selects an eligible model for the request. ## Wire Use authenticated `GET /v1/models` to discover current public model IDs, then send the exact ID when you want Wire to execute that model. --- SOURCE: https://elektric.ai/docs/products/grid TITLE: Elektric Grid --- # Grid Use Grid when you want Elektric to choose the model. Send `model: "elektric-grid"` when an explicit Grid identifier is required. ## Supported request families Grid can handle text and streaming chat, web access, attachments, tools, and supported image, video, speech, and transcription operations. Availability depends on the eligible models and API surface. ## Selection and fallback Grid classifies the request, identifies required capabilities, removes unavailable or incapable models, and chooses among the eligible routes using quality, cost, and availability. If a selected route fails before output begins, Grid may try another eligible route. It does not silently restart after streamed output begins. Usage logs record the selected model and provider where available. --- SOURCE: https://elektric.ai/docs/understand/grid-routing TITLE: How Grid routes --- # How Grid routes 1. **Understand the request.** Grid determines the request category and difficulty and identifies requirements such as streaming, attachments, web access, tools, or media. 2. **Filter candidates.** Models that cannot satisfy the required capabilities or are unavailable are removed. 3. **Choose a route.** Grid compares eligible routes using quality, cost, and availability. 4. **Fallback before output.** A failed route may be replaced before customer-visible output begins; a stream is not silently restarted after output begins. 5. **Record the result.** Request logs include the selected model, provider, status, latency, fallback activity, and provider cost where available. Use the exact result from the request log when diagnosing a route. --- SOURCE: https://elektric.ai/docs/products/wire TITLE: Elektric Wire --- # Wire Wire executes the exact public model ID supplied by the caller. Use authenticated `GET /v1/models` to discover IDs and capabilities. Wire does not silently switch models, fall back to Grid, or change a chat request into another operation. If the model is unavailable or the requested capability is unsupported, the request fails with a Request ID. Use the matching operation for chat, images, video, audio, or embeddings. Keep the Elektric API key server-side. --- SOURCE: https://elektric.ai/docs/reference/models TITLE: Models --- # Models Authenticated `GET /v1/models` is the source of truth for current public model IDs. Each entry can describe the provider, capabilities, supported operations, display information, and limits. Use returned IDs with Wire. Grid chooses from models currently eligible for the request. Capabilities and availability can change independently of provider marketing names, so do not guess IDs or capability support. --- SOURCE: https://elektric.ai/docs/products/benchmark TITLE: Benchmark --- # Benchmark Benchmark evaluates representative AI traffic. It groups requests by category and difficulty, then compares reviewed model evidence on quality, cost, speed, and reliability. It does not execute every request through every model. Start a Benchmark in the dashboard, connect the supplied Observe token, use the application normally, then return to review results and historical runs. Capture and retention details are in [Capture & Privacy](https://elektric.ai/docs/understand/capture-and-privacy). --- SOURCE: https://elektric.ai/docs/understand/capture-and-privacy TITLE: What Benchmark captures --- # Capture & Privacy Benchmark metadata includes information needed for analysis, such as model or provider, token usage, timing, and status where available. Benchmark content mode additionally captures the final user prompt. It does not capture system or developer instructions, assistant responses, earlier turns, retrieved context, tool payloads, attachment contents, arbitrary provider objects, or request headers. Raw captured prompt data is retained for up to 14 days. Benchmark metadata is retained while active and cleaned up within 30 days after it ends or is cancelled. Tokens are invalidated when collection ends. --- SOURCE: https://elektric.ai/docs/reference/errors-limits TITLE: Errors & Limits --- # Errors & Limits Handle authentication, invalid request, unavailable, billing, rate-limit, timeout, and asset-expired errors explicitly. Use the Request ID for support and honor `Retry-After` when present. ## Current limits Use authenticated `GET /v1/limits` for the effective account limits. Limits and model availability can change; do not copy a static catalog into an integration. ## Model discovery Use authenticated `GET /v1/models` for current model IDs and capabilities. Wire rejects unavailable or incompatible exact-model requests; Grid reports an error when no eligible route succeeds. --- SOURCE: https://elektric.ai/docs/build/openai-compatibility TITLE: OpenAI Migration --- # OpenAI migration For an existing OpenAI-compatible client, point the base URL to https://elektric.ai/v1, use `ELEKTRIC_API_KEY`, and send the canonical compatibility model `elektric-grid` for Grid requests. Keep the key server-side and set client retries deliberately because an unknown network outcome can repeat work. This is a focused compatibility surface. Check the current product pages and authenticated model catalog before relying on an endpoint, option, or capability. --- SOURCE: https://elektric.ai/docs/products TITLE: Products --- # Products Elektric has three current products. Benchmark evaluates a workload, Wire executes an exact public model, and Grid chooses an eligible model for each request. They share the same API key, API base, usage logs, and billing surfaces.