Google Models
Basic Chat
POST /v1beta/models/<Model ID>:generateContentcurl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "How does AI work?"
}
]
}
]
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"x-goog-api-key": "<API Key>",
"Content-Type": "application/json",
}
payload = {
"contents": [
{
"parts": [
{
"text": "How does AI work?"
}
]
}
]
}
resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
data = resp.json()
print(data)Authentication Note: Google model requests use
Authorization: Bearer <API Key>in the header by default. If the Authorization parameter cannot be recognized, replace"Authorization": "Bearer <API Key>"with"x-goog-api-key": "<API Key>".
Request Body Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model ID, e.g., gemini-2.5-flash. Specified via the URL path /v1beta/models/<Model ID>:generateContent |
contents | array | Yes | The content of the current conversation. See Content in Data Models. For single-turn requests, this is a single instance; for multi-turn requests (see Multi-turn Conversation), it contains the conversation history and the latest request |
systemInstruction | object | No | Developer-set system instructions (Content structure) to define the model's behavior and role. Currently text only |
generationConfig | object | No | Configuration options for generation, controlling sampling, output format, thinking, etc. See Optional Parameters below |
safetySettings | array | No | List of safety settings, at most one per safety category. Each includes category (e.g., HARM_CATEGORY_HATE_SPEECH) and threshold (e.g., BLOCK_MEDIUM_AND_ABOVE). Categories not set use the default filtering level |
tools | array | No | List of tools the model may call, e.g., googleSearch, urlContext, codeExecution, functionDeclarations. See Tool in Data Models |
toolConfig | object | No | Tool configuration. functionCallingConfig.mode controls the function calling mode: AUTO (model decides), ANY (must call a function), NONE (no function calls), VALIDATED (model decides with validated calls); allowedFunctionNames limits the callable functions (only effective in ANY/VALIDATED mode) |
cachedContent | string | No | The name of the cached content to use as context. Format: cachedContents/{cachedContent} |
serviceTier | string | No | The service tier of the request. Values: unspecified (default, same as standard), standard, flex, priority |
labels | object | No | Labels with user-defined metadata for the request. Keys must start with a letter, be no longer than 63 characters, and contain only lowercase letters, digits, underscores, and dashes |
continuationToken | string | No | An opaque token to resume generation from a previous response that stopped with CONTINUATION. When provided, contents must identically replicate the initial request, and maxOutputTokens must be monotonically increased or omitted |
Optional Parameters
Google model parameters are centralized in the generationConfig object.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
generationConfig.temperature | float | No | 1.0 | Sampling temperature, range 0.0~2.0. Higher values (e.g., 1.5) make output more random and creative, lower values (e.g., 0.3) make output more deterministic and focused. 0 means almost deterministic output. Note: deprecated on Gemini 3.6 Flash and newer models; values are silently ignored |
generationConfig.topP | float | No | - | Nucleus sampling threshold, range 0.0~1.0. The model considers tokens with cumulative probability up to topP. For example, 0.95 means only consider the most likely tokens that cumulatively reach 95% probability. Note: deprecated on Gemini 3.6 Flash and newer models; values are silently ignored |
generationConfig.topK | int | No | - | Only sample from the top K most likely tokens. For example, setting it to 40 means the model only chooses from the 40 highest probability tokens each time. Note: deprecated on Gemini 3.6 Flash and newer models; values are silently ignored |
generationConfig.maxOutputTokens | int | No | - | Maximum tokens for response generation. Setting this parameter controls response length and cost. Different models have different maximum limits; values exceeding the limit are automatically adjusted |
generationConfig.candidateCount | int | No | 1 | Number of response candidates to generate. Setting it greater than 1 returns multiple different response candidates, each billed separately. Useful for scenarios requiring multiple different answers (not supported on the Gemini 1.0 family) |
generationConfig.stopSequences | array | No | - | List of stop sequences, up to 5 strings. Generation stops immediately when any stop sequence appears in the generated text. The stop sequence itself is not included in the output. Useful for controlling output format |
generationConfig.seed | int | No | - | Seed used in decoding. If not set, the request uses a randomly generated seed. Fixing the seed provides more reproducible output |
generationConfig.presencePenalty | float | No | 0.0 | Presence penalty coefficient, range -2.0~2.0. Positive values penalize tokens that have already appeared, encouraging the model to talk about new topics; negative values encourage repeating existing topics |
generationConfig.frequencyPenalty | float | No | 0.0 | Frequency penalty coefficient, range -2.0~2.0. Positive values penalize tokens based on their frequency in the text, decreasing likelihood of repeating the same words; negative values increase repetition likelihood |
generationConfig.responseLogprobs | bool | No | false | Whether to return log probability information for output tokens. When enabled, the response includes log probabilities for each token, useful for analyzing model certainty and confidence |
generationConfig.logprobs | int | No | - | Number of top candidate tokens to return at each position, range 0~20, only valid when responseLogprobs: true. When set, each output token position returns the specified number of alternative tokens and their probabilities |
generationConfig.responseMimeType | string | No | text/plain | MIME type of the response. Values: text/plain (default text), application/json (JSON output), text/x.enum (ENUM string output). When using JSON mode, it's recommended to use responseJsonSchema to define the JSON structure |
generationConfig.responseJsonSchema | object | No | - | JSON schema for the response, used for structured output; must be used with responseMimeType: "application/json". When defined, the model strictly generates JSON responses according to the schema. See Schema in Data Models. Officially recommended over the legacy responseSchema field |
generationConfig.responseModalities | array | No | ["TEXT"] | The requested modalities of the response. Combination of TEXT, IMAGE, AUDIO. An empty list is equivalent to requesting only text; image generation requires ["IMAGE"] or ["TEXT", "IMAGE"] (image models only) |
generationConfig.speechConfig | object | No | - | Speech generation config (audio-output models only). voiceConfig.prebuiltVoiceConfig.voiceName specifies the prebuilt voice; languageCode sets the BCP-47 language code (e.g., en-US, cmn-CN); use multiSpeakerVoiceConfig.speakerVoiceConfigs for multi-speaker scenarios |
generationConfig.mediaResolution | string | No | - | Resolution tier for input media, affecting token cost of media understanding. Values: MEDIA_RESOLUTION_LOW (64 tokens), MEDIA_RESOLUTION_MEDIUM (256 tokens), MEDIA_RESOLUTION_HIGH (256 tokens with zoomed reframing) |
generationConfig.enableEnhancedCivicAnswers | bool | No | false | Whether to enable enhanced civic answers. May not be available for all models |
generationConfig.enableAffectiveDialog | bool | No | false | Whether to enable affective dialog. When enabled, the model detects user emotions and adapts its responses accordingly |
generationConfig.thinkingConfig | object | No | - | Config for thinking features (an error is returned if set for models that don't support thinking). When configured, the model performs internal reasoning before answering |
generationConfig.thinkingConfig.thinkingBudget | int | No | - | Token budget available for the thinking process. Setting it to 0 completely disables the thinking feature. Higher values allow deeper reasoning but increase latency and cost |
generationConfig.thinkingConfig.thinkingLevel | string | No | - | Controls the maximum depth of the model's internal reasoning. Values: MINIMAL (little to no thinking), LOW, MEDIUM, HIGH. Recommended for Gemini 3 and later models; using it with earlier models returns an error |
generationConfig.thinkingConfig.includeThoughts | bool | No | false | Whether to include the model's thought process in the response (thought parts). Thoughts are returned only when available |
generationConfig.imageConfig | object | No | - | Config for image generation (image models only). aspectRatio sets the aspect ratio (e.g., 1:1, 16:9), imageSize sets the resolution (512, 1K, 2K, 4K). See Image Generation docs |
safetySettings | array | No | - | Safety settings array for controlling harmful content filtering levels. Each setting includes category (e.g., HARM_CATEGORY_HATE_SPEECH) and threshold (e.g., BLOCK_MEDIUM_AND_ABOVE). Can adjust filtering strength based on application scenarios |
tools | array | No | - | List of tools the model may call. Google models support specific tools like googleSearch (web search), urlContext (URL content extraction), codeExecution (code execution), etc. See Tool in Data Models |
toolConfig | object | No | - | Tool configuration for controlling tool calling behavior. Can set functionCallingConfig.mode to AUTO (model decides), ANY (must call tools), NONE (no tool calling), or VALIDATED (model decides with validation) |
Notes:
- Google model reasoning and generation control parameters must be placed within the
generationConfigobject, which differs from the flat parameter structure of OpenAI and Anthropic.temperature,topP, andtopKare deprecated on Gemini 3.6 Flash and newer models — values are silently ignored (no error, but no effect). For older models they still work, and it's recommended to adjust only one of the three; adjusting multiple may lead to unpredictable sampling behavior.thinkingConfigonly works with models that support thinking. For Gemini 3 and later models,thinkingLevelis recommended; older models usethinkingBudget.presencePenaltyandfrequencyPenaltycan be used together; combining them provides more fine-grained control over output repetition and diversity.
Full Parameters Example
curl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "How does AI work?"
}
]
}
],
"generationConfig": {
"temperature": 1.0,
"topP": 0.95,
"maxOutputTokens": 2048,
"thinkingConfig": {
"thinkingBudget": 1024
}
}
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"x-goog-api-key": "<API Key>",
"Content-Type": "application/json",
}
payload = {
"contents": [
{
"parts": [
{
"text": "How does AI work?"
}
]
}
],
"generationConfig": {
"temperature": 1.0,
"topP": 0.95,
"maxOutputTokens": 2048,
"thinkingConfig": {
"thinkingBudget": 1024
}
}
}
resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
data = resp.json()
print(data)Multi-turn Conversation
Multi-turn conversations pass the full conversation history through the contents array, with each message using role to distinguish the speaker (user for the user, model for the model).
curl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hi, I would like to learn about the main attractions in Beijing."
}
]
},
{
"role": "model",
"parts": [
{
"text": "Beijing has many famous attractions, such as the Forbidden City, Tiananmen Square, the Summer Palace, and the Great Wall. How many days do you have?"
}
]
},
{
"role": "user",
"parts": [
{
"text": "Only one day. Please help me plan the visiting order."
}
]
}
]
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"Authorization": "Bearer <API Key>",
"Content-Type": "application/json",
}
payload = {
"contents": [
{
"role": "user",
"parts": [
{"text": "Hi, I would like to learn about the main attractions in Beijing."}
],
},
{
"role": "model",
"parts": [
{
"text": "Beijing has many famous attractions, such as the Forbidden City, Tiananmen Square, the Summer Palace, and the Great Wall. How many days do you have?"
}
],
},
{
"role": "user",
"parts": [{"text": "Only one day. Please help me plan the visiting order."}],
},
]
}
resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
data = resp.json()
print(data["candidates"][0]["content"]["parts"][0]["text"])Note:
roleonly supportsuserandmodel. For single-turn requests it can be omitted (defaults touser). A multi-turn conversation must end with ausermessage.
Structured Output
Use responseMimeType: "application/json" together with responseJsonSchema to define the output structure, and the model will generate JSON responses strictly following the schema. For supported schema fields, see Schema in Data Models.
curl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "List three famous science fiction authors and their representative works."
}
]
}
],
"generationConfig": {
"responseMimeType": "application/json",
"responseJsonSchema": {
"type": "object",
"properties": {
"authors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Author name"
},
"representativeWork": {
"type": "string",
"description": "Representative work title"
}
},
"required": ["name", "representativeWork"]
}
}
},
"required": ["authors"]
}
}
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"Authorization": "Bearer <API Key>",
"Content-Type": "application/json",
}
payload = {
"contents": [
{
"parts": [
{
"text": "List three famous science fiction authors and their representative works."
}
]
}
],
"generationConfig": {
"responseMimeType": "application/json",
"responseJsonSchema": {
"type": "object",
"properties": {
"authors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string", "description": "Author name"},
"representativeWork": {
"type": "string",
"description": "Representative work title",
},
},
"required": ["name", "representativeWork"],
},
}
},
"required": ["authors"],
},
},
}
resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
data = resp.json()
# The returned text is a JSON string conforming to the schema
print(data["candidates"][0]["content"]["parts"][0]["text"])Search Request
Native Model Search Request
POST /v1beta/models/<Model ID>:generateContentcurl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "How is the weather in Beijing today?"
}
]
}
],
"tools": [
{
"googleSearch": {}
},
{
"urlContext": {}
}
]
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API Key>",
}
payload = {
"contents": [
{
"parts": [
{
"text": "How is the weather in Beijing today?"
}
]
}
],
"tools": [
{
"googleSearch": {}
},
{
"urlContext": {}
}
]
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
result = response.json()
print(result)Default Search Request
POST /v1beta/models/<Model ID>:generateContentcurl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"text": "How is the weather in Beijing today?"
}
]
}
]
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API Key>",
}
payload = {
"contents": [
{
"parts": [
{
"text": "How is the weather in Beijing today?"
}
]
}
]
}
response = requests.post(url, headers=headers, json=payload, timeout=30)
response.raise_for_status()
result = response.json()
print(result)Supported Model IDs:
- gemini-3-pro-preview-search
Video Understanding
POST /v1beta/models/<Model ID>:generateContentcurl --location --request POST 'https://neolink.com/api/v1beta/models/<Model ID>:generateContent' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"parts": [
{
"inline_data": {
"mime_type": "video/mp4",
"data": "<Base64 Code>"
}
},
{
"text": "Please summarize the main content of this video and list three key moments."
}
]
}
]
}'import requests
url = "https://neolink.com/api/v1beta/models/<Model ID>:generateContent"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API Key>",
}
payload = {
"contents": [
{
"parts": [
{
"inline_data": {
"mime_type": "video/mp4",
"data": "<Base64 Code>"
}
},
{
"text": "Please summarize the main content of this video and list three key moments."
}
]
}
]
}
resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
data = resp.json()
print(data)Base64 Encoding Note: The
<Base64 Code>parameter is the Base64-encoded string of the video file. Reference script:
#!/usr/bin/env bash
set -euo pipefail
VIDEO_PATH="./demo.mp4"
if [[ "$(base64 --version 2>&1)" = *"FreeBSD"* ]]; then
B64FLAGS="--input"
else
B64FLAGS="-w0"
fi
base64 $B64FLAGS "$VIDEO_PATH" > base64.txtResponse Body
Response Example
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "AI (Artificial Intelligence) works by simulating human intelligence..."
}
]
},
"finishReason": "STOP",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 8,
"candidatesTokenCount": 328,
"totalTokenCount": 336
},
"modelVersion": "gemini-2.5-flash",
"responseId": "aBcDeFgHiJkLmNoP"
}Response Field Description
| Field | Type | Description |
|---|---|---|
candidates | array | List of candidate responses generated by the model. See Candidate in Data Models |
candidates[].content | object | The generated content. role is always model; parts contains text or tool call segments |
candidates[].finishReason | string | The reason the model stopped generating tokens. Common values: STOP (natural stop), MAX_TOKENS (token limit reached), SAFETY (safety filtering), RECITATION (recitation). Full enum in Candidate |
candidates[].index | int | Index of the candidate in the response candidate list |
promptFeedback | object | Feedback related to content filters for the prompt. When the prompt is blocked, blockReason is returned: SAFETY (safety reasons), BLOCKLIST (terminology blocklist), PROHIBITED_CONTENT (prohibited content), IMAGE_SAFETY (image safety), OTHER (unknown); no candidates are returned in this case |
usageMetadata | object | Token usage metadata for the generation request |
usageMetadata.promptTokenCount | int | Number of tokens in the prompt (including tokens in cached content) |
usageMetadata.cachedContentTokenCount | int | Number of tokens in the cached part of the prompt |
usageMetadata.candidatesTokenCount | int | Total number of tokens across all generated response candidates |
usageMetadata.thoughtsTokenCount | int | Number of thought tokens for thinking models |
usageMetadata.toolUsePromptTokenCount | int | Number of tokens present in tool-use prompts |
usageMetadata.totalTokenCount | int | Total token count (prompt + tool-use prompt + thoughts + response candidates) |
usageMetadata.promptTokensDetails | array | Token breakdown by modality for request input. Each entry includes modality (e.g., TEXT, IMAGE, VIDEO, AUDIO) and tokenCount |
usageMetadata.candidatesTokensDetails | array | Token breakdown by modality for response output, same structure as above |
modelVersion | string | The model version used to generate the response |
responseId | string | Unique identifier of the response, used to locate the request when troubleshooting |
Data Models
The following are the core data structures involved in requests and responses (condensed version). For complete definitions, refer to the Google official API documentation.
Content
The base structured datatype of a message, containing the role and content parts.
| Field | Type | Required | Description |
|---|---|---|---|
role | string | No | The producer of the content. Values: user or model. Required for multi-turn conversations; can be omitted for single-turn requests |
parts | array | Yes | Ordered parts that constitute a single message. Parts may have different MIME types. See Part below |
Part
A content part within Content. The data field is a union type (only one can be set).
| Field | Type | Description |
|---|---|---|
text | string | Inline text |
inlineData | object | Inline media bytes. mimeType is an IANA standard MIME type (e.g., image/png, video/mp4, application/pdf); data is the Base64-encoded bytes |
fileData | object | URI-based file data. fileUri (required) is the file URI; mimeType is the MIME type |
functionCall | object | A function call predicted by the model. name (required) is the function name; args is a JSON object of parameters; id is the call identifier |
functionResponse | object | The result of a function call, sent back as context to the model. name (required) is the function name; response (required) is the JSON output; id matches the corresponding functionCall id |
executableCode | object | Code generated by the model that is meant to be executed. language (required, currently only PYTHON); code (required) is the code content |
codeExecutionResult | object | Result of executing the executableCode. outcome (required) values: OUTCOME_OK (success, output contains stdout), OUTCOME_FAILED (failure, output contains stderr), OUTCOME_DEADLINE_EXCEEDED (timeout) |
thought | bool | Indicates whether this part is a thought from the model (used with thinkingConfig.includeThoughts) |
thoughtSignature | string | An opaque signature for the thought; must be echoed back in subsequent requests to maintain multi-turn thinking context |
Candidate
A response candidate generated by the model.
| Field | Type | Description |
|---|---|---|
index | int | Index of the candidate |
content | object | The generated content. See Content |
finishReason | string | The reason the model stopped generating tokens. Main values listed below |
finishMessage | string | Details of the stop reason, only populated when finishReason is set |
safetyRatings | array | Safety ratings for this candidate, at most one per category. Includes category, probability, blocked, etc. |
citationMetadata | object | Citation information for passages recited from training data, via citationSources |
groundingMetadata | object | Grounding metadata for search-augmented answers, including groundingChunks (retrieved sources, e.g., web.uri/web.title), groundingSupports (mapping between sources and text), webSearchQueries (executed search queries) |
tokenCount | int | Token count for this candidate |
Main finishReason values:
| Value | Description |
|---|---|
STOP | Natural stop point of the model or provided stop sequence |
MAX_TOKENS | The maximum number of tokens specified in the request was reached |
SAFETY | The candidate content was flagged for safety reasons |
RECITATION | The candidate content was flagged for recitation reasons |
LANGUAGE | The candidate content was flagged for using an unsupported language |
BLOCKLIST | Generation stopped because the content contains forbidden terms |
PROHIBITED_CONTENT | Generation stopped for potentially containing prohibited content |
SPII | Generation stopped because the content potentially contains Sensitive Personally Identifiable Information |
MALFORMED_FUNCTION_CALL | The function call generated by the model is invalid |
IMAGE_SAFETY / IMAGE_PROHIBITED_CONTENT / IMAGE_OTHER | Image generation stopped due to safety / prohibited content / other issues |
NO_IMAGE | The model was expected to generate an image, but none was generated |
UNEXPECTED_TOOL_CALL | The model generated a tool call but no tools were enabled in the request |
TOO_MANY_TOOL_CALLS | The model called too many tools consecutively |
CONTINUATION | The response reached the per-request token limit but is not complete; generation can be continued via continuationToken |
OTHER | Unknown reason |
Tool
Tools that the model may use. Each element in the tools array can only specify one tool type.
| Field | Type | Description |
|---|---|---|
functionDeclarations | array | List of function declarations for Function Calling. Each includes name (required, up to 128 chars), description (required), and parameters (a Schema) or parametersJsonSchema (JSON Schema format, mutually exclusive with parameters). The model does not execute functions; it returns a functionCall for the client to execute |
googleSearch | object | Google Search tool, giving the model web retrieval capability. Optional timeRangeFilter (startTime/endTime to limit the time range) and searchTypes (webSearch for web search, enabled by default; imageSearch for image search) |
urlContext | object | URL context tool, automatically extracts content from user-provided URLs as context |
codeExecution | object | Code execution tool, allowing the model to execute Python code during generation and use the results |
fileSearch | object | File Search tool, retrieving knowledge from Semantic Retrieval corpora. fileSearchStoreNames (required) specifies the stores, e.g., fileSearchStores/my-store-123; optional topK, metadataFilter |
googleMaps | object | Google Maps tool, grounding the model's response with geospatial context. Optional enableWidget returns a widget context token |
computerUse | object | Computer use tool, automatically injecting predefined functions to operate browser/mobile/desktop environments. environment (required) values: ENVIRONMENT_BROWSER, ENVIRONMENT_MOBILE, ENVIRONMENT_DESKTOP |
mcpServers | array | List of MCP Servers to connect to. Each includes name and streamableHttpTransport (url, headers, timeout settings, etc.) |
Schema
Schema defines the data types for structured output and function parameters/responses. It is a subset of the OpenAPI 3.0 Schema.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Data type. Values: STRING, NUMBER, INTEGER, BOOLEAN, ARRAY, OBJECT, NULL |
format | string | No | The format of the data, e.g., enum, date-time |
description | string | No | A brief description of the parameter. May be formatted as Markdown and include examples |
nullable | bool | No | Indicates if the value may be null |
enum | array | No | Possible values for STRING type elements |
items | object | No | Schema of the elements of ARRAY type |
minItems / maxItems | string | No | Minimum/maximum number of elements for ARRAY type |
properties | object | No | Properties of OBJECT type; keys are property names, values are Schema |
required | array | No | Required property names of OBJECT type |
minProperties / maxProperties | string | No | Minimum/maximum number of properties for OBJECT type |
minimum / maximum | number | No | Minimum/maximum value of INTEGER/NUMBER type |
minLength / maxLength | string | No | Minimum/maximum length of STRING type |
pattern | string | No | Regular expression to restrict a STRING type |
anyOf | array | No | The value must validate against any of the subschemas in the list |
propertyOrdering | array | No | The order of the properties (not a standard OpenAPI field), used to determine property order in the response |
