{"id":"google/gemini-3.7-flash","object":"model","created":1796390227,"owned_by":"google","name":"Gemini 3.7 Flash","modality":"text","capabilities":["chat","vision","function_calling"],"context_window":1048576,"max_output_tokens":65536,"pricing":{"input_per_million":0.75,"output_per_million":3.75,"billing_unit":"token"},"tier":"frontier","is_open_weight":false,"schema":{"endpoint":{"method":"POST","path":"/v1/chat/completions","url":"https://api.aigateway.sh/v1/chat/completions","content_type":"application/json"},"quirks":{},"reasoning_effort":"Thinking cannot be turned off through this API: reasoning_effort \"none\" clamps to the lowest available thinking level.","request_example":"{\n  \"model\": \"google/gemini-3.7-flash\",\n  \"messages\": [\n    { \"role\": \"system\", \"content\": \"You are a helpful assistant.\" },\n    { \"role\": \"user\",   \"content\": \"Hello!\" }\n  ],\n  \"temperature\": 0.7,\n  \"top_p\": 0.95,\n  \"max_tokens\": 1024,\n  // Thinking cannot be turned off through this API: reasoning_effort \"none\" clamps to the lowest available thinking level.\n  \"reasoning_effort\": \"medium\",\n  \"stream\": false,\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Get current weather for a city\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"city\": { \"type\": \"string\" }\n          },\n          \"required\": [\"city\"]\n        }\n      }\n    }\n  ],\n  \"tool_choice\": \"auto\",\n  \"parallel_tool_calls\": true\n\n  // For vision: messages[].content can be an array of\n  //   { type: \"text\", text: \"...\" }  and\n  //   { type: \"image_url\", image_url: { url: \"https://...\" } }\n}","response_example":"{\n  \"id\": \"chatcmpl-abc123\",\n  \"object\": \"chat.completion\",\n  \"created\": 1776947082,\n  \"model\": \"google/gemini-3.7-flash\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"Hello! How can I help you today?\",\n        \"tool_calls\": [\n          {\n            \"id\": \"call_abc123\",\n            \"type\": \"function\",\n            \"function\": {\n              \"name\": \"get_weather\",\n              \"arguments\": \"{\\\"city\\\":\\\"Tokyo\\\"}\"\n            }\n          }\n        ]\n      },\n      \"finish_reason\": \"stop\"   // or \"tool_calls\" when calling a function\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 24,\n    \"completion_tokens\": 12,\n    \"total_tokens\": 36\n  }\n}","streaming_example":"// 1. Role announcement (first chunk):\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\n// 2. Content chunks (final answer):\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"content\":\"!\"},\"finish_reason\":null}]}\n\n// Tool-call chunks (when the assistant calls a function):\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[\n  {\"index\":0,\"id\":\"call_abc\",\"type\":\"function\",\n   \"function\":{\"name\":\"get_weather\",\"arguments\":\"\"}}]},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[\n  {\"index\":0,\"function\":{\"arguments\":\"{\\\"city\\\":\"}}]},\"finish_reason\":null}]}\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[\n  {\"index\":0,\"function\":{\"arguments\":\"\\\"Tokyo\\\"}\"}}]},\"finish_reason\":null}]}\n// Concat arguments fragments by index → {\"city\":\"Tokyo\"}\n\n// Finish chunk:\ndata: {\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\n// Terminator:\ndata: [DONE]","sdk":{"python":"# pip install openai\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"https://api.aigateway.sh/v1\",\n    api_key=\"sk-aig-...\",\n)\n\nstream = client.chat.completions.create(\n    model=\"google/gemini-3.7-flash\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n    stream=True,\n)\nfor chunk in stream:\n    print(chunk.choices[0].delta.content or \"\", end=\"\", flush=True)","typescript":"// pnpm add openai\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  baseURL: \"https://api.aigateway.sh/v1\",\n  apiKey: process.env.AIG_KEY,\n});\n\nconst stream = await client.chat.completions.create({\n  model: \"google/gemini-3.7-flash\",\n  messages: [{ role: \"user\", content: \"Hello!\" }],\n  stream: true,\n});\nfor await (const chunk of stream) {\n  process.stdout.write(chunk.choices[0]?.delta?.content ?? \"\");\n}","curl":"curl https://api.aigateway.sh/v1/chat/completions \\\n  -H \"Authorization: Bearer $AIGATEWAY_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"google/gemini-3.7-flash\",\n    \"messages\": [{\"role\":\"user\",\"content\":\"Hello!\"}],\n    \"stream\": true\n  }'"}}}