---
title: "Create an interaction."
method: POST
path: "/v1alpha/interactions"
tags: ["Interactions"]
---

# Create an interaction.

`POST /v1alpha/interactions`

Create an interaction using the Google Interactions API format.

## Request body

- GoogleCreateInteractionRequest — Request body for POST /v1alpha/interactions.
  - `model` string, required — The model to use for generation.
  - `input` union, required — Prompt string or list of conversation turns.
    - string
    - GoogleInputTurn[]
      - `role` 'user' | 'model', required
      - `content` union, required — Content items for this turn. Can be a plain string or a list of content items.
        - string
        - union[]
          - union
            - GoogleTextContent — A text content item.
              - …
            - GoogleFunctionCallContent — A function call content item (model requesting a tool invocation).
              - …
            - GoogleFunctionResponseContent — A function response/result content item (user providing tool results). Accepts both 'function_response' (generateContent API) and 'function_result' (Interactions API) type values, and both 'response' and 'result' field names.
              - …
  - `system_instruction` string, nullable — System prompt.
  - `generation_config` GoogleGenerationConfig — Generation parameters for the Interactions API.
    - `temperature` number, nullable — Sampling temperature.
    - `top_k` integer, nullable — Top-k sampling parameter.
    - `top_p` number, nullable — Nucleus sampling parameter.
    - `max_output_tokens` integer, nullable — Maximum number of tokens to generate.
  - `tools` GoogleTool[], nullable — Tools (function declarations) available to the model.
    - `type` string — Tool type.
    - `function_declarations` GoogleFunctionDeclaration[], required — List of function declarations.
      - `name` string, required — The name of the function.
      - `description` string, nullable — Description of the function.
      - `parameters` object, nullable — JSON Schema for the function's input parameters.
  - `previous_interaction_id` string, nullable — ID of a previous interaction to continue the conversation from.
  - `stream` boolean, nullable — Whether to stream the response via SSE.
  - `response_modalities` string[], nullable — Accepted response modalities (e.g. ['TEXT']). Accepted for compatibility, ignored in v1.

## Response `200`

A GoogleInteractionResponse or a stream of Google SSE events.

- GoogleInteractionResponse — Response from POST /v1alpha/interactions (non-streaming).
  - `id` string, required — Unique interaction ID.
  - `created` string, nullable — Creation timestamp.
  - `status` 'completed'
  - `updated` string, nullable — Last update timestamp.
  - `model` string, required — Model used for generation.
  - `outputs` union[], required — Response output items.
    - union
      - GoogleTextOutput — A text output item.
        - `type` 'text'
        - `text` string, required
      - GoogleFunctionCallOutput — A function call output item (model requesting a tool invocation).
        - `type` 'function_call'
        - `id` string, nullable — Unique identifier for this function call.
        - `name` string, required — Name of the function to call.
        - `arguments` object — Arguments for the function call.
      - GoogleThoughtOutput — A thought/reasoning output item (model's internal reasoning).
        - `type` 'thought'
        - `signature` string, nullable — Signature for the thought block.
  - `role` 'model'
  - `usage` GoogleUsage — Token usage statistics.
    - `total_input_tokens` integer
    - `total_output_tokens` integer
    - `total_tokens` integer
  - `object` 'interaction'

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/versions/f3f783962256/schema)
