modelflaredev commited on
Commit
a92fdad
·
verified ·
1 Parent(s): 3b4e9a4

Upload 2 files

Browse files
data/chat_completions_examples.jsonl CHANGED
@@ -1,8 +1,7 @@
1
- {"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."}
2
- {"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."}
3
- {"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."}
4
- {"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."}
5
- {"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/"}
6
- {"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/"}
7
- {"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/"}
8
- {"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/"}
 
1
+ {"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."}
2
+ {"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."}
3
+ {"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."}
4
+ {"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."}
5
+ {"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/"}
6
+ {"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/"}
7
+ {"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/"}
 
data/endpoint_map.json CHANGED
@@ -20,9 +20,7 @@
20
  },
21
  {
22
  "family": "anthropic_messages",
23
- "method": "POST",
24
- "path": "/v1/messages",
25
- "base_url_note": "ANTHROPIC_BASE_URL=https://modelflare.dev (CLI appends Messages path)",
26
  "use_for": "Claude Code"
27
  },
28
  {
@@ -34,14 +32,15 @@
34
  {
35
  "family": "gemini_native",
36
  "method": "POST",
37
- "path": "/v1beta/models/{model}:generateContent",
38
- "use_for": "Gemini CLI and Gemini image models"
 
39
  },
40
  {
41
  "family": "video_create",
42
  "method": "POST",
43
  "path": "/v1/videos",
44
- "use_for": "Create async video task"
45
  },
46
  {
47
  "family": "video_poll",
@@ -67,5 +66,7 @@
67
  "path": "/v1/models",
68
  "use_for": "List models the current key can call"
69
  }
70
- ]
 
 
71
  }
 
20
  },
21
  {
22
  "family": "anthropic_messages",
23
+ "base_url_note": "ANTHROPIC_BASE_URL=https://modelflare.dev (site origin, not /v1); the Claude Code CLI appends the Messages path itself",
 
 
24
  "use_for": "Claude Code"
25
  },
26
  {
 
32
  {
33
  "family": "gemini_native",
34
  "method": "POST",
35
+ "path": "/v1/models/{model}:generateContent",
36
+ "use_for": "Gemini image models; also served on origin.modelflare.dev",
37
+ "gemini_cli_note": "Gemini CLI builds the same path under /v1beta, which only modelflare.dev serves"
38
  },
39
  {
40
  "family": "video_create",
41
  "method": "POST",
42
  "path": "/v1/videos",
43
+ "use_for": "Create async video task (Seedance, Wan, Kling, and other async video models)"
44
  },
45
  {
46
  "family": "video_poll",
 
66
  "path": "/v1/models",
67
  "use_for": "List models the current key can call"
68
  }
69
+ ],
70
+ "auth_note": "Send the Authorization header on every request, including video polling and downloads.",
71
+ "image_video_keys": "Image and video work with a Smart API Key or a media group API key."
72
  }