Chat completion: Gemini 3.5 Flash-Lite (OpenAI-compatible)
curl --request POST \
--url https://api.apiyi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3.5-flash-lite",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
'import requests
url = "https://api.apiyi.com/v1/chat/completions"
payload = {
"model": "gemini-3.5-flash-lite",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-3.5-flash-lite',
messages: [{role: 'user', content: 'Introduce yourself in one sentence'}]
})
};
fetch('https://api.apiyi.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-3.5-flash-lite',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce yourself in one sentence'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"gemini-3.5-flash-lite\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gemini-3.5-flash-lite\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gemini-3.5-flash-lite\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"choices": [
{
"message": {
"role": "<string>",
"content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Gemini 3.5 Flash-Lite
Gemini 3.5 Flash-Lite Chat API 레퍼런스
Gemini 3.5 Flash-Lite Chat Completions API 레퍼런스 및 인터랙티브 플레이그라운드: OpenAI 호환, 기본값으로 추론 없음, 스트리밍, 함수 호출, 비전 지원.
POST
/
v1
/
chat
/
completions
Chat completion: Gemini 3.5 Flash-Lite (OpenAI-compatible)
curl --request POST \
--url https://api.apiyi.com/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3.5-flash-lite",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
'import requests
url = "https://api.apiyi.com/v1/chat/completions"
payload = {
"model": "gemini-3.5-flash-lite",
"messages": [
{
"role": "user",
"content": "Introduce yourself in one sentence"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-3.5-flash-lite',
messages: [{role: 'user', content: 'Introduce yourself in one sentence'}]
})
};
fetch('https://api.apiyi.com/v1/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apiyi.com/v1/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-3.5-flash-lite',
'messages' => [
[
'role' => 'user',
'content' => 'Introduce yourself in one sentence'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apiyi.com/v1/chat/completions"
payload := strings.NewReader("{\n \"model\": \"gemini-3.5-flash-lite\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apiyi.com/v1/chat/completions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gemini-3.5-flash-lite\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apiyi.com/v1/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gemini-3.5-flash-lite\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Introduce yourself in one sentence\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"model": "<string>",
"choices": [
{
"message": {
"role": "<string>",
"content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}오른쪽의 플레이그라운드를 사용하십시오:
Bearer sk-your-api-key을 Authorization에 넣고 전송을 누르십시오 — 기본적으로 추론을 하지 않으므로 응답이 빠릅니다.심층 추론을 위해
reasoning_effort: "high"를 전달하십시오(참고: 이 엔드포인트는 이 모델에 대해 reasoning_tokens를 보고하지 않습니다 — 정확한 추론 관찰을 위해 네이티브 플레이그라운드를 사용하십시오). 검색 그라운딩, 코드 실행 및 기타 네이티브 도구는 이 엔드포인트에서 사용할 수 없습니다. 개요 및 측정 데이터: Gemini 3.5 Flash-Lite 개요.매개변수 빠른 참고
| 매개변수 | 유형 | 필수 | 참고 |
|---|---|---|---|
model | string | ✓ | 고정값: gemini-3.5-flash-lite |
messages | array | ✓ | 표준 OpenAI 메시지입니다. content는 멀티모달 배열일 수 있습니다(image_url는 data URL을 지원합니다) |
max_tokens | int | 출력 쿼터; reasoning_effort: "high" 사용 시 2000 이상을 권장합니다 | |
reasoning_effort | string | high가 추론을 유발합니다. usage에는 추론량이 보고되지 않습니다 | |
stream | bool | SSE 스트리밍 | |
response_format | object | json_schema 구조화된 출력, 작동 확인됨 | |
tools | array | 함수 호출 도구 목록, 작동 확인됨 |
응답 참고사항
usage.completion_tokens_details.reasoning_tokens는 이 모델에서는 보고되지 않습니다(3.6 Flash는 보고합니다) — thinking 사용량은completion_tokens에 포함됩니다- Thinking text(reasoning_content)는 이 엔드포인트에서 그대로 표시되지 않습니다
- 모델 이름
gemini-3.5-flash-lite(세 개의 소문자 세그먼트로 이루어진 하이픈 연결 형식)을 다시 확인하십시오
인증
Add Authorization: Bearer YOUR_API_KEY header
본문
application/json
Fixed: gemini-3.5-flash-lite
Standard OpenAI messages array
Show child attributes
Show child attributes
Output quota; 2000+ recommended with thinking on (thinking bills as output)
SSE streaming
Thinking tier
사용 가능한 옵션:
low, medium, high Structured output, json_schema supported
Function-calling tool list
이 페이지가 도움이 되었나요?
⌘I