Upload 2 files
Browse filesFiles changed (2)
12345678{"id":"chat-basic","family":"chat_completions","method":"POST","url":"https://modelflare.dev/v1/chat/completions","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY","Content-Type":"application/json"},"body":{"model":"grok-4.7","messages":[{"role":"user","content":"Hello from Hugging Face"}]},"notes":"Model id must be enabled on the key's group."}{"id":"chat-streaming","family":"chat_completions","method":"POST","url":"https://modelflare.dev/v1/chat/completions","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY","Content-Type":"application/json"},"body":{"model":"grok-4.7","messages":[{"role":"user","content":"Say hi in one line"}],"stream":true},"notes":"SSE stream; consume deltas like OpenAI SDK stream=True."}{"id":"chat-system-prompt","family":"chat_completions","method":"POST","url":"https://modelflare.dev/v1/chat/completions","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY","Content-Type":"application/json"},"body":{"model":"grok-4.7","messages":[{"role":"system","content":"Reply in one short sentence."},{"role":"user","content":"What is Modelflare?"}]},"notes":"Standard multi-turn chat envelope."}{"id":"list-models","family":"models","method":"GET","url":"https://modelflare.dev/v1/models","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY"},"body":null,"notes":"Lists models the current key can call — not a full price catalog."}{"id":"responses-stub","family":"responses","method":"POST","url":"https://modelflare.dev/v1/responses","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY","Content-Type":"application/json"},"body":{"model":"gpt-5.6-sol","input":"Reply with one sentence confirming the model."},"notes":"Used by Codex (wire_api=responses). Full setup: https://docs.modelflare.dev/guides/clients/codex/"}{"id":"anthropic-messages-sketch","family":"anthropic_messages","method":"POST","url":"https://modelflare.dev/v1/messages","headers":{"x-api-key":"YOUR_MODELFLARE_API_KEY","anthropic-version":"2023-06-01","Content-Type":"application/json"},"body":{"model":"claude-sonnet-5","max_tokens":256,"messages":[{"role":"user","content":"ping"}]},"notes":"Prefer Claude Code settings: ANTHROPIC_BASE_URL=https://modelflare.dev (no /v1). Guide: https://docs.modelflare.dev/guides/clients/claude-code/"}{"id":"images-minimal","family":"images","method":"POST","url":"https://modelflare.dev/v1/images/generations","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY","Content-Type":"application/json"},"body":{"model":"YOUR_IMAGE_MODEL","prompt":"A white cat in neon rain","n":1},"notes":"Fields vary by model. Use a media group key. Docs: https://docs.modelflare.dev/models/image/"}{"id":"video-create-highlevel","family":"video","method":"POST","url":"https://modelflare.dev/v1/videos","headers":{"Authorization":"Bearer YOUR_MODELFLARE_API_KEY","Content-Type":"application/json"},"body":{"model":"YOUR_VIDEO_MODEL","prompt":"A calm ocean at sunrise"},"notes":"Async: poll GET /v1/videos/{task_id}, download GET /v1/videos/{task_id}/content. Envelope varies. Docs: https://docs.modelflare.dev/models/video/"}1234567{"id": "chat-basic", "family": "chat_completions", "method": "POST", "url": "https://modelflare.dev/v1/chat/completions", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY", "Content-Type": "application/json"}, "body": {"model": "gpt-5.6-sol", "messages": [{"role": "user", "content": "Hello from Hugging Face"}]}, "notes": "Model id must be enabled on the key's group."}{"id": "chat-streaming", "family": "chat_completions", "method": "POST", "url": "https://modelflare.dev/v1/chat/completions", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY", "Content-Type": "application/json"}, "body": {"model": "gpt-5.6-sol", "messages": [{"role": "user", "content": "Say hi in one line"}], "stream": true}, "notes": "SSE stream; consume deltas like OpenAI SDK stream=True. Once content has been sent, the gateway does not replay the stream on another route."}{"id": "chat-system-prompt", "family": "chat_completions", "method": "POST", "url": "https://modelflare.dev/v1/chat/completions", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY", "Content-Type": "application/json"}, "body": {"model": "gpt-5.6-sol", "messages": [{"role": "system", "content": "Reply in one short sentence."}, {"role": "user", "content": "What is Modelflare?"}]}, "notes": "Standard multi-turn chat envelope."}{"id": "list-models", "family": "models", "method": "GET", "url": "https://modelflare.dev/v1/models", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY"}, "body": null, "notes": "Lists models the current key can call — not a full price catalog."}{"id": "responses-stub", "family": "responses", "method": "POST", "url": "https://modelflare.dev/v1/responses", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY", "Content-Type": "application/json"}, "body": {"model": "gpt-5.6-sol", "input": "Reply with one sentence confirming the model."}, "notes": "Used by Codex (wire_api=responses). Full setup: https://docs.modelflare.dev/guides/clients/codex/"}{"id": "images-minimal", "family": "images", "method": "POST", "url": "https://modelflare.dev/v1/images/generations", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY", "Content-Type": "application/json"}, "body": {"model": "gpt-image-2", "prompt": "A white cat runs through a neon-lit street in the rain", "size": "1024x1024", "n": 1}, "notes": "Documented gpt-image-2 example. Returns data[].b64_json. Fields vary by model. Use a Smart API Key or a media group key. Docs: https://docs.modelflare.dev/models/image/gpt-image-2/"}{"id": "video-create-seedance", "family": "video", "method": "POST", "url": "https://modelflare.dev/v1/videos", "headers": {"Authorization": "Bearer YOUR_MODELFLARE_API_KEY", "Content-Type": "application/json"}, "body": {"model": "seedance-2.5", "content": [{"type": "text", "text": "A cat walks through a sunlit room"}], "resolution": "720p", "duration": 5, "ratio": "16:9"}, "notes": "Async. Save id (compatibility responses may use task_id). Poll GET /v1/videos/{task_id} while status is queued or in_progress; stop at completed or failed. Download GET /v1/videos/{task_id}/content. Body is family-specific. Docs: https://docs.modelflare.dev/guides/video/seedance-task-query/"}
19 unmodified lines2021222324252627285 unmodified lines343536373839404142434445464719 unmodified lines676869707119 unmodified lines},{"family": "anthropic_messages","method": "POST","path": "/v1/messages","base_url_note": "ANTHROPIC_BASE_URL=https://modelflare.dev (CLI appends Messages path)","use_for": "Claude Code"},{5 unmodified lines{"family": "gemini_native","method": "POST","path": "/v1beta/models/{model}:generateContent","use_for": "Gemini CLI and Gemini image models"},{"family": "video_create","method": "POST","path": "/v1/videos","use_for": "Create async video task"},{"family": "video_poll",19 unmodified lines"path": "/v1/models","use_for": "List models the current key can call"}]}19 unmodified lines202122232425265 unmodified lines32333435363738394041424344454619 unmodified lines6667686970717219 unmodified lines},{"family": "anthropic_messages","base_url_note": "ANTHROPIC_BASE_URL=https://modelflare.dev (site origin, not /v1); the Claude Code CLI appends the Messages path itself","use_for": "Claude Code"},{5 unmodified lines{"family": "gemini_native","method": "POST","path": "/v1/models/{model}:generateContent","use_for": "Gemini image models; also served on origin.modelflare.dev","gemini_cli_note": "Gemini CLI builds the same path under /v1beta, which only modelflare.dev serves"},{"family": "video_create","method": "POST","path": "/v1/videos","use_for": "Create async video task (Seedance, Wan, Kling, and other async video models)"},{"family": "video_poll",19 unmodified lines"path": "/v1/models","use_for": "List models the current key can call"}],"auth_note": "Send the Authorization header on every request, including video polling and downloads.","image_video_keys": "Image and video work with a Smart API Key or a media group API key."}
data/chat_completions_examples.jsonl+7-8
data/endpoint_map.json+8-7