GENERAL MODEL API
Your model.
Your task.
Use supported OpenRouter text models and your own messages through your existing VibeEdit account and analysis balance.
This is a bounded, asynchronous JSON API. A successful admission returns an original request identity; read that identity for the answer and measured charge. It does not implement OpenAI endpoint parity or streaming.
Account and scoped key
Sign in through the existing email setup. Use that fresh session bearer token to POST the following JSON to /v1/video/keys, with an original Idempotency-Key. Select your existing account and project. Save the returned key privately. The existing six-service setup defaults do not grant models access; older and narrow keys are never expanded automatically.
{
"accountId": "YOUR_EXISTING_ACCOUNT_ID",
"projectIds": [
"YOUR_PROJECT_ID"
],
"customerServices": [
"models"
],
"customerAccess": [
"read",
"submit"
],
"customerBillingAccess": false
}
Subsequent requests use Authorization: Bearer YOUR_SCOPED_KEY, X-Organization-Id: YOUR_EXISTING_ACCOUNT_ID and X-Project-Id: YOUR_PROJECT_ID. TEST and LIVE accounts remain separate. Creating a key starts no provider work.
Discover and quote
GET /v1/models/capabilities for the authenticated contract. GET /v1/models for up to 100 current models, using the returned nextAfter as the next after query value. Discovery prices are informational. Only text-input, text-only-output models qualify for this route; native web-search models are excluded.
POST this JSON to /v1/models/quote for a nonbillable current hold estimate. Replace the example model/task/cap with your selection. Output limit and approved maximum are required.
{
"model": "openai/gpt-4.1-nano",
"messages": [
{
"role": "user",
"content": "Suggest three concise titles for a film about a winter garden."
}
],
"max_completion_tokens": 128,
"maxRetailUsd": 0.05,
"stream": false
}
A quote returns live endpoint price ceilings, a conservative input/output bound, quote expiry, hold and approved maximum. The hold uses the established general-model 1.2× provider-cost multiplier. No fixed minimum analysis subscription, separate wallet or automatic top-up is added. Quoting does not upload media or submit inference.
Submit once and read the original result
POST the same task JSON to /v1/models/chat/completions with a saved, unique Idempotency-Key. Keep the body and key unchanged on an exact transport retry. Admission rechecks current prices against your cap and reserves the same analysis balance. HTTP202 means admitted or awaiting reconciliation, not a completed model answer.
Persist the returned requestIdentity. GET /v1/models/requests/{requestIdentity} with the same account/project headers. Read response.choices when present; read settlement for the acknowledged charge. settled proves cost reconciliation, while the provider response remains the authority for task success. Accepted jobs continue in the queue after disconnect.
Atomic submission claims allow at most one upstream transmission per original admission. A lost acknowledgement or missing provider-cost receipt retains the original hold; it never becomes a zero charge or an automatic provider retry. Keep the original identity if state is submission-unknown, awaiting-receipt or pricing-dispute. Check the original result again; do not create a replacement request to recover a missing answer. Provider-submitted work has no cancellation endpoint in this version.
Supported request boundary
Requests are at most 64 KiB, 1–100 text messages, 1–4096 output tokens and an explicit maximum above 0 and at most 100 USD. Supported roles are system, user, assistant and tool. Client-side function definitions, function calls and text results are supported when the selected provider supports those parameters. Your client executes any functions; VibeEdit executes no tools.
Optional parameters: temperature, top_p, top_k, min_p, frequency_penalty, presence_penalty, repetition_penalty, seed, stop, response_format, tools, tool_choice, parallel_tool_calls. Unsupported provider parameters fail rather than silently falling back. Set stream:false or omit it.
Not implemented: SSE streaming, Responses, embeddings, image/audio/video inputs or outputs, hosted tools, native web search or model fallback lists. Requests and responses are retained as private immutable service artifacts for original-request reconciliation; do not include credentials in model messages. Read the privacy policy and your chosen provider’s terms before sending sensitive content.
Public machine-readable contract · Six understanding APIs · Account and balance