Skip to content

AsyncBatch

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:4250

optional requests: object[]

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20250823.0/node_modules/@cloudflare/workers-types/index.ts:4251

optional external_reference: string

User-supplied reference. This field will be present in the response as well it can be used to reference the request and response. It’s NOT validated to be unique.

optional frequency_penalty: number

Decreases the likelihood of the model repeating the same lines verbatim.

optional max_tokens: number

The maximum number of tokens to generate in the response.

optional presence_penalty: number

Increases the likelihood of the model introducing new topics.

optional prompt: string

Prompt for the text generation model

optional repetition_penalty: number

Penalty for repeated tokens; higher values discourage repetition.

optional response_format: JSONMode

optional seed: number

Random seed for reproducibility of the generation.

optional stream: boolean

If true, the response will be streamed back incrementally using SSE, Server Sent Events.

optional temperature: number

Controls the randomness of the output; higher values produce more random results.

optional top_p: number

Adjusts the creativity of the AI’s responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.