4.2 KiB
name, description
| name | description |
|---|---|
| eapil-llmapi-structured | Build, test, or debug EAPIL LLM API requests across Chat, Responses, structured output, tools, streaming, embeddings, reranking, and typed Decisions. |
EAPIL LLM API guide
Choose the protocol for the task and model, then verify the deployed gateway's behavior. The historical skill ID remains for compatibility; this guide covers general LLM API calls, not only structured JSON.
Choose the mode
| Need | EAPIL endpoint | Read when relevant |
|---|---|---|
| Conversation, compatible clients, vision or client tools | /v1/chat/completions |
Chat and Responses |
| Responses-native input/output, tools or streaming | /v1/responses |
Chat and Responses |
| JSON conforming to a schema | Either text endpoint, if the model/channel supports it | Structured output |
| Text vectors for retrieval or similarity | /v1/embeddings |
Embedding and Rerank |
| Reorder candidate documents against a query | /v1/rerank |
Embedding and Rerank |
| Probabilistic yes/no, categorical choice or ordinal scoring | /v1/alpha/decisions, alias /api/alpha/decisions |
Decisions |
Chat is a first-class mode, not a universal fallback. Responses is not inherently cheaper or faster. Decisions uses its own state/questions protocol; the inspected gateway does not automatically convert Chat/Responses requests into Decisions. Image and voice workflows have their own repository skills.
Use the actual integration
Default base URL is https://api-n-cd.playones.com/v1. Respect the user's intended deployment and available model; do not force a model/version from an old example. Query /v1/models when availability matters. A listed ID does not prove each endpoint, parameter, tool, schema or modality is supported. Model aliases and channel conversion can differ from the public provider's defaults.
Use EAPIL_API_KEY, then OPENAI_API_KEY, or the user's specified environment source. Keep credentials, private inputs, vectors and raw provider responses out of committed artifacts and routine logs. Use synthetic small probes for compatibility; do not replay production data or fan out broad paid benchmarks merely to verify an example.
Read only the relevant mode reference. Keep endpoint-specific field shapes distinct: Responses input and text.format, Chat messages and response_format, Decisions state and questions. Pass explicit supported values without dropping 0, false or empty collections that carry meaning. Omit optional model-specific parameters when their support is unknown.
Test the contract
Use smoke_api.py with an explicit UTF-8 JSON payload for each mode. It supports dry runs and Chat/Responses SSE, omits generated text and vectors from summaries, and performs mode-specific structural checks. Decisions summaries include labels/answers; dry runs print the payload. It makes one request and executes no returned tools. For a ready-made structured/vision probe, use smoke_structured_output.py.
Check the result, not only HTTP 200: completed text or a tool call, usable indices/dimensions, expected typed answers, or valid application JSON. Parsing JSON alone does not validate a schema. For streaming, consume deltas/items and require a terminal success; truncated output, refusals and error events are separate outcomes.
Start with one request and a small supported output budget. A timeout can leave an unknown billed outcome; inspect status before retrying. Compare latency and usage only for equivalent prompts, inputs, settings and successful results. Reasoning token fields, encrypted reasoning and route conversion are diagnostic evidence, not universal proof of a forced reasoning setting.
Deliver
Identify endpoint, deployed model alias, relevant parameters, parsing/validation and observed limitations. Use the dated verification record to distinguish source inspection, this run's live tests and untested features. A tiny smoke test proves the tested contract, not accuracy or reliability for all workloads.