Skip to main content
POST
BaseURL: The default BaseURL is https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Body

application/json
model
enum<string>
required

Select the Gemini text model to call:

Available options:
gemini-3.6-flash,
gemini-3.5-flash,
gemini-3.5-flash-lite,
gemini-3.1-pro-preview,
gemini-3.1-pro-preview-customtools,
gemini-3.1-flash-lite-preview,
gemini-3-pro-preview,
gemini-3-flash-preview,
gemini-2.5-pro,
gemini-2.5-flash,
gemini-2.5-flash-lite
Example:

"gemini-3.6-flash"

messages
object[]
required

List of chat messages, supports multi-turn dialogue and multimodal input

Minimum array length: 1
stream
boolean
default:false

Whether to return response in streaming mode

  • true: Streaming return, receives content in real-time chunks
  • false: Returns complete response at once
Example:

false

max_completion_tokens
integer | null

Maximum number of completion tokens for the generated response, corresponding to Gemini's maxOutputTokens.

gemini-3.6-flash / gemini-3.5-flash-lite have a limit of 65,536 tokens; other models follow their respective specs.

Required range: 1 <= x <= 65536
Example:

2000

max_tokens
integer

Maximum number of tokens for the generated response, compatible with the legacy OpenAI parameter.

Required range: 1 <= x <= 65536
Example:

2000

temperature
number
default:1

Sampling temperature, controls output randomness

Description:

  • Lower values (e.g., 0.2): More deterministic, focused output
  • Higher values (e.g., 1.5): More random, creative output

⚠️ Consistent across the entire Gemini 3.x series (does not vary by model): custom values within the valid range do not affect the output; a value outside this parameter's valid range returns a 400 rather than being silently ignored.

Required range: 0 <= x <= 2
Example:

0.7

top_p
number
default:0.95

Nucleus Sampling parameter

Description:

  • Controls sampling from tokens within the top cumulative probability
  • For example, 0.9 means selecting from tokens whose cumulative probability reaches 90%
  • Default: 0.95

Recommendation: Do not adjust temperature and top_p simultaneously

⚠️ Consistent across the entire Gemini 3.x series (does not vary by model): custom values within the valid range do not affect the output; a value outside this parameter's valid range returns a 400 rather than being silently ignored.

Required range: 0 <= x <= 1
Example:

0.9

frequency_penalty
number | null
default:0

Frequency penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's frequencyPenalty.

⚠️ Consistent across the entire Gemini 3.x series: passed values are filtered out by the gateway and have no effect (no error is raised).

Required range: -2 <= x <= 2
Example:

0

presence_penalty
number | null
default:0

Presence penalty coefficient. Range: -2.0 to 2.0. Corresponds to Gemini's presencePenalty.

⚠️ Consistent across the entire Gemini 3.x series: passed values are filtered out by the gateway and have no effect (no error is raised).

Required range: -2 <= x <= 2
Example:

0

stop

Stop sequences. Supports a string or string array, corresponding to Gemini's stopSequences.

n
integer | null
default:1

Number of candidates to generate

⚠️ Gemini 3.x only supports 1; passing >1 returns a 400 (equivalent to the candidateCount that has been removed from the native API).

Required range: 1 <= x <= 1
Example:

1

reasoning_effort
enum<string> | null

Limits the thinking effort, corresponding to Gemini's thinking level:

  • minimal: near-zero thinking, high throughput / low latency
  • low: less thinking, simple tasks
  • medium: balanced quality and speed
  • high: deep multi-step reasoning

Effective only for the Gemini 3.x series, with different supported levels and defaults per model (consistent with the native API):

Available options:
minimal,
low,
medium,
high
Example:

"minimal"

seed
integer | null

Random seed used to make output as reproducible as possible, corresponding to Gemini's seed.

Example:

12345

response_format
object

Response format settings, supporting JSON mode and JSON Schema, corresponding to Gemini's responseMimeType, responseSchema and responseJsonSchema.

stream_options
object | null

Streaming response options. Can be set when stream is true.

tools
object[] | null

List of tool definitions for Function Calling.

tool_choice

Controls tool-calling behavior.

Available options:
none,
auto,
required
extra_body
object | null

Gemini extension parameters.

Response

Chat completion generated successfully

id
string

Unique identifier for the chat completion

Example:

"chatcmpl-20251010015944503180122WJNB8Eid"

model
string

Model name actually used

Example:

"gemini-3.6-flash"

object
enum<string>

Response type

Available options:
chat.completion
Example:

"chat.completion"

created
integer

Creation timestamp

Example:

1760032810

choices
object[]

List of chat completion choices

usage
object

Token usage statistics