⌘K

Gemini 4 Neon

gemini-4-neon

Gemini 4 Neon is Google's model for complex software engineering, knowledge work, and science workflows, combining frontier-level intelligence with fast end-to-end task completion. It accepts text, image, audio, video, and PDF inputs with text output. Input and output share a unified 1,048,576 token context window, with up to 65,536 output tokens per synchronous request.

API Notes

gemini-4-neon is generally available and accepts text, image, audio, video, and PDF inputs with text output

gemini-4-neon shares a unified 1,048,576 token context window across input, thinking, function calls, and the final response

gemini-4-neon supports up to 65,536 output tokens per synchronous segment, for both streaming and non-streaming requests

gemini-4-neon supports thinking levels LOW, MEDIUM, HIGH, and XHIGH, with HIGH as the default

gemini-4-neon ignores in-range custom values for sampling parameters temperature, top_p, and top_k

gemini-4-neon long decode beyond 65,536 tokens requires Google’s native background execution or continuation mechanisms, separate from this Chat Completions endpoint

gemini-4-neon total output with long decode is limited to 1,048,576 tokens minus the input tokens

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Value: gemini-4-neon


messages array required

Array of message objects representing the conversation history

role string required

Message role

Options: user, assistant, system, developer

content string | array required

Text string or OpenAI-compatible multimodal content array


max_tokens integer

Maximum output tokens, including thinking tokens, function calls, and the final response

Range: 1 - 65536


stream boolean

Whether to stream response incrementally


Response Format

id string

Unique identifier for the completion


object string

Object type, always chat.completion


created integer

Unix timestamp of creation time


model string

The model used for completion


choices array

Array of completion choices

index integer

Choice index

message object

The generated message

role string

Message role (always assistant)

content string

Generated text content

finish_reason string

Reason for completion termination


usage object

Token usage statistics

prompt_tokens integer

Number of tokens in the prompt

completion_tokens integer

Number of tokens in the completion

total_tokens integer

Total tokens used