Create a message

Compatible with the Anthropic Messages protocol, with optional built-in octen_broad_search and octen_search tools.

post/v1/messages

Request

  • Base URL: https://api.octen.ai
  • URL: https://api.octen.ai/v1/messages
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Headers

anthropic-versionstring

Anthropic protocol version, e.g. 2023-06-01. Sent automatically by the Anthropic SDK. Defaults to 2023-06-01 if omitted.

Request body

model'openai/gpt-6.1-sol' | 'openai/gpt-6-astra' | 'openai/gpt-5.6-sol' | 'openai/gpt-5.6-terra' | 'openai/gpt-5.6-luna' | 'openai/gpt-5.4' | 'anthropic/claude-fable-5.1' | 'anthropic/claude-fable-5' | 'anthropic/claude-opus-5.5' | 'anthropic/claude-opus-5' | 'anthropic/claude-opus-4.8' | 'anthropic/claude-opus-4.6' | 'anthropic/claude-sonnet-5.5' | 'anthropic/claude-sonnet-5' | 'anthropic/claude-sonnet-4.6' | 'anthropic/claude-haiku-5.5' | 'anthropic/claude-haiku-4.5' | 'google/gemini-4-argon' | 'google/gemini-3.8-flash' | 'google/gemini-3.5-flash' | 'google/gemini-3.5-flash-lite' | 'google/gemini-3.1-pro-preview' | 'google/gemini-3.1-flash-lite' | 'google/gemini-3-flash-preview' | 'moonshotai/kimi-k3' | 'moonshotai/kimi-k2.6' | 'moonshotai/kimi-k2.5' | 'minimax/minimax-m2.5' | 'qwen/qwen3.6-plus' | 'deepseek/deepseek-v4-pro' | 'deepseek/deepseek-v4-flash-0731' required

The model to use. Anthropic models also accept their native ids (e.g. claude-opus-4-8), which map to anthropic/claude-opus-4.8.

max_tokensinteger required

Maximum number of tokens to generate, including thinking and visible output tokens.

streamboolean

Whether to enable streaming output.

temperaturenumber

Controls randomness.

top_pnumber

Nucleus sampling. If unset, no nucleus truncation is applied. Set only one of temperature and top_p.

top_kinteger

Sample only from the top K tokens. If unset, top-k filtering is disabled.

stop_sequencesstring[]

Stop sequences.

Example request

{
  "tools": [
    {
      "parameters": {
        "include_domains": [
          "octen.ai",
          "wikipedia.org"
        ],
        "exclude_domains": [
          "spam.com",
          "ads.example.net"
        ],
        "start_time": "2025-01-01T00:00:00+08:00",
        "end_time": "2025-01-01T00:00:00+08:00",
        "language": [
          "en",
          "zh"
        ]
      }
    }
  ]
}

Response

Successful message response. When stream=false, returns a single message object. When stream=true, returns an Anthropic SSE event stream.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.