Skip to documentation
Browse documentation

Generate answer

Submit a prompt with locale, country, anonymous model, and source-policy controls in a fresh Gemini context; return a complete answer and execution evidence.

Capability ID gemini.answer.generate
Cost 1 credit per request
Maximum runtime 180 seconds
View raw Get an API key

POST /execute Shared execution endpoint

Input parameters

FieldTypeRequiredDescription
country string Optional
include_sources boolean Optional
locale string Optional
max_sources integer Optional
mode string Optional
model string Optional
prompt string Required
source_policy object Optional
source_policy.excluded_domains array<string> Optional
source_policy.official_sources_only boolean Optional
source_policy.preferred_domains array<string> Optional
source_policy.published_after string Optional
source_policy.published_before string Optional
timezone string Optional

Response

Successful output is returned in results[0].data. Raw platform output is intentionally open-ended and may evolve with the upstream source.

Illustrative sample The full redacted fixture is shown in the response panel.

Illustrative output fields

Derived from the sample above for orientation only. These observed fields are not a fixed response schema.

PathObserved typeExample
completed boolean true
finish_reason string stop
grounded boolean false
model string 3.5 Flash-Lite
query string In one short sentence, explain what photosynthesis does.
response string Photosynthesis is the process by which plants convert sunlight, water, …

Execution behavior

A 200 response completed inline. A 202 response was queued; poll GET /jobs/:id until the job reaches completed or failed.

Resources