supports the following models: gemini-exp-1114 gemini-exp-1121 gemini-exp-1206 gemini-2.0-flash-exp gemini-2.0-flash-thinking-exp-1219 gemini-2.0-flash-thinking-exp-01-21 gemini-2.0-flash gemini-2.0-flash-lite-preview-02-05 gemini-2.5-pro-exp-03-25 gemini-2.5-pro-preview-03-25 gemini-2.5-flash-preview-04-17 gemini-2.5-pro-preview-05-06 gemini-2.5-pro-preview-05-06-thinking(Demonstrate thought process) gemini-2.5-flash-preview-05-20 gemini-2.5-flash-preview-05-20-nothink(Force close thinking) gemini-2.5-pro-preview-06-05 gemini-2.5-pro-preview-06-05-thinking(Demonstrate thought process) gemini-2.5-pro gemini-2.5-flash gemini-2.5-flash-lite-preview-06-17 gemini-3-pro-previewNote: 302.AI modified the API format to be compatible with OpenAI's API formatPrice List:https://302.ai/price
Request
Header Params
Body Params application/json
Example
{"model":"gemini-3-pro-preview","stream":false,"messages":[{"role":"user","content":[{"type":"text","text":"What's in this picture"},{"type":"image_url","image_url":{"url":"https://s2.loli.net/2024/02/01/QSWVdw9bX56gj7O.jpg"}}]}]}
{"id":"chatcmpl-123","object":"chat.completion","created":1677652288,"choices":[{"index":0,"message":{"role":"assistant","content":"\n\nHello there, how may I assist you today?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":9,"completion_tokens":12,"total_tokens":21}}