Skip to content

Connection guides

Detailed setup guides for SDKs, coding agents, IDEs, and OpenAI-compatible clients.

No current prepared translation is available. The English source is shown without machine translation.

Choose the client you use:

Create an API key in the Model Gate control panel. The full key is shown only once.

Playground access

Open Playground in the account menu to use Request builder or Model Verification. On Business profiles the section remains visible while Model API is enabled, even when no usable key has been assigned yet. A setup page explains missing account verification, company activation, key permissions or API endpoint configuration and offers permitted management links and Support. Simply opening Playground makes no paid request and does not create a key.

Requests require a permitted active key. A project-bound key must belong to the current company and an active project. With developer or administrator execution access, a member may use a shared project credential in Playground without receiving its permanent secret. The browser session represents the signed-in member, not the key's custodian; viewing usage alone does not grant execution. When Model API is disabled for a domain, its Playground routes are also unavailable. Temporary-password and required two-factor setup still take precedence.

The panel uses its current domain profile's configured API endpoint. It does not switch to another project's API when a binding is missing. The key selector shows resettable usage against the configured spending limit; lifetime spend is not that counter. Current key/project limits and company balance are checked before issuing a short-lived session, and the API remains authoritative for live admission and billing. A project freeze or permission change after page load can make the previously selected key unavailable; refresh the page after an authorized correction.

Multimodal request formats

The Builder offers the input formats supported by the selected model. OpenAI-compatible image generation uses /v1/responses with the hosted image_generation tool; the generated image_generation_call.result is decoded and shown as an image artifact. OpenAI Responses PDF input uses an input_file content item with a complete data:application/pdf;base64,... value in file_data. Anthropic Messages PDF input uses a native document block with source.type=base64, media_type=application/pdf and the bare base64 bytes. The browser reads selected files locally and sends them directly to the configured Model API endpoint; the panel does not upload them first. The Builder does not advertise Chat Completions as a PDF format. Raw JSON remains available for provider-specific contracts outside these tested shapes.

Compatible request choices

In Request builder, choose a request type first to see compatible models. Protocol, endpoint and Streaming choices follow the selected model's declared capabilities and protocol-specific checks; a check for one API family is not reused as proof for another. Compatible Claude models default to Anthropic Messages. Explicit endpoint limitations still apply, and Raw JSON remains available for a deliberately selected protocol and body. Catalog compatibility is not a live availability guarantee.

A disabled Send button explains what is missing directly below it: select a key/model, provide the required prompt or file, correct the request schema/token limit, or wait for the current submission. Changing request type may select another compatible model. Vision and function tools use the chosen API family's payload; PDF is not sent through Chat Completions. These choices do not alter the separate Model Verification reference contract.

Model Verification

/chat/verify compares an endpoint with a ready behavioral reference of the selected canonical model. The current method is model-verification-behavioral-reference-v2.0. It is not a provider attestation or a claim about training records.

Ready reference, no research stage

A ready reference contains saved observations for sixteen consecutive completed months around an observed RECALL anchor. The test selects two facts per month, for a total of 32 questions. It compares the answers with the saved observations; it does not verify training records. Official cutoff metadata is a separate reported date. Questions come from a saved question bank. Provider failures and ungraded/missing answers are not observations of ignorance. Starting a test does not research dates, generate questions or prepare a reference. If a model has no ready reference, choose another available model or contact Support.

One server task, one tested request and one judge

Select a ready reference and an eligible Model Gate key for evaluation billing. The reference pins the protocol, canonical model and exact request contract. New automatic references use minimal-v1: Chat sends only model + one user message, Responses only model + input, and Anthropic Messages additionally sends required max_tokens=4096. Historical references keep their saved legacy options. A server worker makes one request with 32 questions to your selected HTTPS endpoint. The tested model receives questions and closed-book instructions, never the answer key, reference answers, positive/negative labels or expected mistakes.

Your browser submits a task to the panel and reads its saved progress. It makes no direct request to the external endpoint or judge, so their browser CORS policies do not participate. You may close or reload the page and open the run from recent history. Reading or reconnecting to a task never creates another paid request. If submission confirmation is lost, use the recovery action for the same submission; do not create a new run to bypass an unknown outcome.

The external key is sent to the panel over HTTPS, temporarily stored encrypted for the worker and removed after the external response is saved or the task ends. It is not placed in browser local/session storage or returned by task status. Private raw responses are encrypted and available only to the task owner for up to 24 hours from creation. A task cannot start a new provider stage more than one hour after creation. Account, key, company, domain and spending permissions are rechecked before dispatch. An IP-restricted Model Gate key must permit the worker server's actual outbound address.

There is no cutoff lookup, hosted search, bank population or question generation in this lifecycle. Local snapshot selection is not a paid generation call. The external provider may charge for its request; the judge uses the selected eligible Model Gate credential through the configured Model Gate API. A saved response can be processed after worker recovery without repeating the tested request. A dispatched request with no saved complete response stops as an unknown outcome and is not automatically retried. Cancellation prevents the next stage; an already sent request may finish and be billed. Automatic format checks and the old Instruction Following score remain excluded; semantic assessment belongs exclusively to the judge.

Judge-only correspondence

The judge receives the current answers, correct answers and all grouped reference observations for the selected 32 facts, including contradictory observations and their multiplicities. It evaluates correctness, declared RECALL/INFERENCE/GUESS/UNKNOWN behavior and departures in either direction. Unexpected correct answers to usually-unsolved reference questions can reduce correspondence; actual correct answers are not relabeled wrong. The judge alone assigns the correspondence score, identity-assessment category, confidence, reasons and limitations. The server validates report structure and counts saved observations but applies no semantic threshold, penalty, weighted score or replacement conclusion.

A high score is not a probability of exact model identity. The report cannot establish a model's price or training date. The stored snapshot and benchmark identify exactly what was compared. Old v1.7 reports retain their original method and are not merged with v2 evidence. No automatic community identity badge is computed from v2 scores.

Reports and privacy

The private trace shows the actual request, saved external response, judge input and judge output without credentials. Raw replies are available to the owner during the retention window of 24 hours; normalized grades, explanations and immutable reference identifiers remain afterwards. Existing historical browser runs keep their saved report and failure reason and are never automatically requeued. Publication is a separate explicit opt-in. Published v2 reports display the saved judge conclusion without another evaluation or server-side rescoring; when full-report publication is selected, its consent covers the published model answer. Private task receipts are not exposed by public task endpoints.

Request compatibility and provider errors (10.28.1)

The Chat Completions verification request places the complete closed-book instructions and all questions, in order, into one user message. This avoids requiring an OpenAI-compatible gateway to translate a system role when it routes to an Anthropic-style backend. The selected protocol and exact endpoint remain authoritative: there is no model-name-based protocol switch, extra tested-model request or general-purpose proxy conversion. Native Anthropic Messages still uses top-level system with a user message; Responses retains its canonical user input. The trace shows the actual outbound JSON. The established transport compatibility is retained. Behavioral-reference v2 supplies a pinned 32-question request without changing the one-tested-model-request rule.

Non-2xx responses are HTTP failures, not unrecognized successful envelopes. A root provider error is reported as Provider error envelope, even when returned with HTTP 200. Such errors never supply model answers, never reach judge evaluation, and cannot be repaired by Retry evaluation of the same response. Protocol compatibility is NOT_ASSESSED for an error response. Any executed external request may still be billable; local reference selection makes no generator call. Raw provider errors remain in the encrypted, owner-only task trace during its retention window and are not public report content. A generic Model Gate error may omit sensitive provider details. Share the request ID with Support, not your key or private response.

Unsupported API paths now return 404 endpoint_not_supported with the requested path; a wrong method on a supported path returns 405 method_not_allowed and Allow. Native /v1/balance is unchanged; /v1/user/balance is not implemented. Share the returned request ID, never your API key, when reporting these errors.

Support contacts in an affiliate Telegram bot

In Affiliates → Your Telegram bots, you can set Support Telegram and Support email while connecting a bot. Both fields are optional. Telegram accepts an @username or an HTTPS t.me contact/invite link; email accepts a normal email address.

For an existing bot, expand Support contacts, edit the fields and select Save support contacts. Each empty field uses the current standard contact for that channel. Clear both fields to restore all standard contacts. Old bots without custom settings continue to use the defaults automatically.

Customers see the effective contacts through Help, /help or /support in that bot. Support commands are also available before registration. The contacts apply only to the receiving bot; they do not change the Model Gate website, other bots, official account notifications or internal ticket recipients. Saving contacts does not require the bot token again, reinstall a webhook or enable a disabled bot.

Dedicated Images tab

Open Playground Images, the third tab beside Request builder and Model Verification, for reviewed-route generation/editing, price confirmation, saved history and private downloads. It uses a separate one-intent permission and does not change the foreground builder or the separate server-task verification lifecycle.

Integration scope

These client guides describe the repository’s configured text/agent interfaces, not a guarantee that a current third-party release implements durable Images. Client-side automatic retries of a potentially paid POST need explicit review. For image generation/editing, use the documented Idempotency-Key, quote, operation polling and authenticated-file flow; SDK examples must not be treated as an automatic async or image compatibility claim. Check the installed client version separately.

For recordings, use Playground Audio and the transcription API. Audio is separate from text chat and Images.

Video workspace

Playground → Video provides text-to-video quotes, progress, saved MP4 playback, private downloads and Raw/cURL. Use an available model/route for the selected key; another paid operation is not a retry of an unknown outcome.