Skip to content
Sign in Create account

EmbeddingsRequest

object

  • attachments array of object

    Client-reviewed attachment text entries.

    Each item:

    • text string
  • clipboard string

    Optional client-reviewed clipboard text.

  • dimensions integer
    Range: at least 1
  • encoding_format string
    One of: "float", "base64". Default: "float"
  • frequency_penalty number
    Range: -2 to 2
  • input any required

    Integer token IDs only. The TypeScript request-body slot list has no reviewed text channel for raw embeddings input.

    One of

    • array of integer
    • array of array of integer
  • max_completion_tokens integer
    Range: 1 to 200000
  • max_tokens integer
  • messages array of object

    Only allowlisted message keys are accepted. annotations, audio metadata, url_citation, and other unknown message keys are rejected with 422 because they may contain text the client has not reviewed. Content parts also reject unknown keys and unsupported types. This gateway input subset is not measured against the upstream provider.

    Each item:

    • cache_control object
      • ttl string
        One of: "5m", "1h"
      • type string required
        One of: "ephemeral"
    • content any required

      One of

      • string
      • array of any

        Each item:

        One of

        • object
        • object
        • object
        • object
    • metadata object

      messages[*].metadata is removed before the request is forwarded. Root metadata keys must match the key class [A-Za-z0-9_.-]{1,32} and are not tokenized. Root string values that match the string class [A-Za-z0-9_.:@+/-]{0,512} are forwarded unchanged, except e-mail-form identity values, which are removed. A key or string outside its class receives 422.

    • role string required
      One of: "system", "developer", "user", "assistant"
    • tool_call_id any
    • tool_calls array of object

      Each item:

      • function object required
        • arguments string required
        • name string
      • id string
      • type string
        One of: "function"
  • metadata object

    messages[*].metadata is removed before the request is forwarded. Root metadata keys must match the key class [A-Za-z0-9_.-]{1,32} and are not tokenized. Root string values that match the string class [A-Za-z0-9_.:@+/-]{0,512} are forwarded unchanged, except e-mail-form identity values, which are removed. A key or string outside its class receives 422.

  • model string required
    Length: at most 64 characters. Pattern: ^(?!.*//)(?!.*(?:^|/)\.{1,2}(?:/|$))(?!.*\/$)[A-Za-z0-9][A-Za-z0-9._:/@~+-]{0,63}(?![\s\S])
  • n integer
    Range: 1 to 128
  • preprompt string

    Optional client-reviewed prompt prefix.

  • presence_penalty number
    Range: -2 to 2
  • provider string

    Provider identifier used for routing. Other values receive 422; inactive or unavailable providers receive 403.

    One of: "openai", "anthropic", "google", "azure", "grok", "openrouter", "gemini", "deepseek", "perplexity", "mistral", "cohere", "groq", "together", "fireworks"
  • reasoning_effort string

    Reasoning effort hint.

    One of: "none", "minimal", "low", "medium", "high", "xhigh", "max"
  • seed integer
    Range: 0 to 2147483647
  • stop any

    Operator configuration, not user text. One string or up to four strings, each at most 32 characters.

    One of

    • string
    • array of string
  • stream boolean
  • system any

    One of

    • string
    • array of object

      Each item:

      • cache_control object
        • ttl string
          One of: "5m", "1h"
        • type string required
          One of: "ephemeral"
      • text string required
      • type string required
        One of: "text"
  • temperature number
  • tool_choice any

    One of

    • string
    • object
      • function object required
        • name string required
      • type string required
        One of: "function"
  • tools array of object

    Each item:

    • function object
    • type string
      One of: "function"
  • top_p number
    Range: 0 to 1
  • user string

    Optional short identifier only. Arbitrary user strings are not supported yet and receive 422.

    Pattern: ^[A-Za-z0-9_.:-]{1,64}$