Request response from the model

Invokes inference using the model chat parameters.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
messages
array of objects
required
length ≥ 1

A list of messages comprising the conversation so far.

Messages*
string
enum
required

The role of the message's author.

Allowed:
string | array
required

The contents of the message.

To pass media (only with role=user):

- Use content parts. Text is passed with type=text.

- Images are passed with type=image_url; set image_url.url to an image URL or a base64 data URI like data:image/{format};base64,{base64encodedimage}.

- Audio is passed with type=audio_url or type=input_audio; set audio_url.url to an audio URL or a base64 data URI, or set input_audio.data to base64 audio data.

For system and assistant roles, the object list format is not supported.

string
required
Defaults to google/gemma-3n-e2b-it

The model to use.

-2 to 2

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

1 to 8192

The maximum number of tokens that can be generated.

-2 to 2

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

-9223372036854776000 to 9223372036854776000

Changing the seed will produce a different response with similar characteristics. Fixing the seed will reproduce the same results if all other parameters are also kept constant.

string | array | null

Sequences where the API will stop generating further tokens.

If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE]

0 to 2

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

≤ 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/event-stream
country_code