Add your Gemini API keys in Feed API. Create a custom endpoint in Create API. Make a POST request to https://keymorph.zeabur.app/v1/{your-endpoint} with a JSON body containing prompt and model fields.
JavaScript: fetch('https://keymorph.zeabur.app/v1/my-api', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({ model:'gemini-2.5-flash', prompt:'Hello!' }) })
Python: requests.post('https://keymorph.zeabur.app/v1/my-api', json={'model':'gemini-2.5-flash','prompt':'Hello!'})
cURL: curl -X POST https://keymorph.zeabur.app/v1/my-api -H "Content-Type: application/json" -d '{"model":"gemini-2.5-flash","prompt":"Hello!"}'
Add "mode":"stream" or "stream":true to your request body. The server responds with Server-Sent Events (SSE). Each event is a JSON object with a text field. The stream ends with [DONE].
Use model gemini-2.5-flash-preview-tts with a prompt field. The response contains a base64-encoded audio field with PCM audio at 24kHz. Decode and play with the Web Audio API or write to a WAV file.
Connect to wss://keymorph.zeabur.app/live/{endpointId} over WebSocket. Use model gemini-2.5-flash-native-audio-preview-09-2025. Send JSON messages with type:audio (base64 PCM at 16kHz), type:text, or type:interrupt. Receive type:ready, type:audio (24kHz PCM), type:text, type:turnComplete, type:interrupted, or type:error messages.
Text models: gemini-2.5-flash (Recommended), gemini-2.5-flash-lite (Fast), gemini-2.5-flash-lite-preview-09-2025 (Preview), gemini-3.1-flash-lite-preview (New), gemini-3-flash-preview (Experimental). Audio models: gemini-2.5-flash-preview-tts (TTS), gemini-2.5-flash-native-audio-preview-09-2025 (Live). Smart rotation: smart-rotate (4x capacity, cycles through 4 models for 80 requests/day per key).
400: Bad request or missing required fields. 401: No endpoint ID provided. 404: Endpoint not found. 429: Rate limit exceeded — wait and retry. 500: Internal server error. 503: All API keys exhausted.