Background and Value
- The platform uses API Key as the sole call credential. All requests first validate quota, expiration, and status to prevent overdrafts or abuse.
- Compatible with OpenAI / Claude / Gemini call formats, allowing you to reuse existing clients by only replacing the Base URL and token.
Use Cases
- First-time integration, wanting to confirm how to carry tokens and call paths.
- Teams or multiple clients sharing a unified entry point, requiring controlled quotas.
- Want clear feedback when quota is insufficient or routes are unavailable, facilitating self-diagnosis.
Core Capabilities
- Token Management: Generate API Keys in the console, where you can set quota, expiration time, and enabled status. Requests first validate these conditions; unmet conditions result in direct rejection.
- Quota and Pre-deduction: Each request pre-deducts quota; successful returns confirm deduction, failures roll back pre-deduction, ensuring quota accuracy.
- Multi-model Compatibility: Supports path and parameter formats for OpenAI
/v1, Claude/claude/v1, and Gemini/gemini/:version. - Common Header Rules: Carry tokens according to compatible endpoints:
- OpenAI compatible:
Authorization: Bearer sk-xxx - Claude compatible:
x-api-key: sk-xxx - Gemini compatible:
x-goog-api-key: sk-xxx
- OpenAI compatible:
- Log Visible Fields: Calls record models, token names, channels, request latency (
request_time), prompt/completion tokens, etc., facilitating troubleshooting and reconciliation.
Key Usage Points
- Obtain Token: Create an API Key in the console, set quota and expiration; ensure status is enabled.
- Choose Endpoint and Base: Replace the client’s API Base with the platform address, e.g.,
https://app.memorylake.ai, following the corresponding compatible endpoint paths. - Include Header: Fill in the token header according to the common rules above; keep other parameters in official format.
- Send Request: You can first call
GET /v1/modelsor corresponding model list endpoints to confirm currently available models. - View Results: After successful requests, view models, channels, latency, and tokens in the logs; aggregated statistics summarize usage and quota consumption by date.
Common Authentication and Quota Notes
- Insufficient Quota: Token quota insufficiency results in direct rejection; check quota or adjust multiplier and retry.
- Token Invalid: Expired or disabled tokens reject requests; update token status or regenerate.
- No Available Route: When target models are unavailable in the current route, a prompt is shown; switch models or adjust route configuration.
- Specify Route: If a fixed route is needed, specify via token suffix or specific header convention (if configured); if not specified, default routing applies.
Limitations and Notes
- Only API Key is supported as call credential; does not involve account login methods.
- Quota validation covers quota, expiration, and status; pre-deduction rolls back on failure.