---
title: "Language model chat"
method: POST
path: "/v1/chat/completions"
tags: ["LLM"]
---

# Language model chat

`POST /v1/chat/completions`

Interact with language models via OpenAI's chat completions API

## Request body

- SchemasChatRequest
  - `frequency_penalty` number
  - `logit_bias` object — LogitBias is must be a token id string (specified by their token ID in the tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct: `"logit_bias":{"1639": 6}` refs: https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
  - `logprobs` boolean — LogProbs indicates whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message. This option is currently not available on the gpt-4-vision-preview model.
  - `max_tokens` integer
  - `messages` SchemasChatMessage[]
    - `content` string, required — The content of the message.
    - `name` string — tool Name
    - `role` string, required — The role of the author of this message. One of system, user, tool, or assistant.
    - `tool_call_id` string — tool_call_id
    - `tool_calls` SchemasModelToolCall[] — tool calls if any
      - `function` SchemasToolFunctionCall
        - `arguments` string
        - `name` string
      - `id` string
      - `type` 'function'
  - `model` string
  - `n` integer
  - `parallel_tool_calls` boolean — Disable the default behavior of parallel tool calls by setting it: false.
  - `presence_penalty` number
  - `response_format` SchemasResponseFormat
    - `type` 'json_object' | 'text'
  - `seed` integer
  - `stop` string[]
  - `stream` boolean
  - `stream_options` SchemasStreamOptions
    - `include_usage` boolean — If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
  - `temperature` number
  - `tool_choice` unknown
  - `tools` unknown
  - `top_logprobs` integer — TopLogProbs is an integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
  - `top_p` number
  - `user` string

## Response `200`

OK

- SchemasChatResponse
  - `choices` SchemasChoice[]
    - `finish_reason` string
    - `index` integer
    - `logprobs` unknown
    - `message` SchemasChatMessage
      - `content` string, required — The content of the message.
      - `name` string — tool Name
      - `role` string, required — The role of the author of this message. One of system, user, tool, or assistant.
      - `tool_call_id` string — tool_call_id
      - `tool_calls` SchemasModelToolCall[] — tool calls if any
        - `function` SchemasToolFunctionCall
          - `arguments` string
          - `name` string
        - `id` string
        - `type` 'function'
    - `tool_authorizations` AuthAuthorizationResponse[]
      - `context` AuthAuthorizationContext
        - `token` string
        - `user_info` object
      - `id` string
      - `provider_id` string
      - `scopes` string[]
      - `status` 'not_started' | 'pending' | 'completed' | 'failed'
      - `url` string
      - `user_id` string
    - `tool_messages` SchemasChatMessage[]
      - `content` string, required — The content of the message.
      - `name` string — tool Name
      - `role` string, required — The role of the author of this message. One of system, user, tool, or assistant.
      - `tool_call_id` string — tool_call_id
      - `tool_calls` SchemasModelToolCall[] — tool calls if any
        - `function` SchemasToolFunctionCall
          - `arguments` string
          - `name` string
        - `id` string
        - `type` 'function'
  - `created` integer
  - `id` string
  - `model` string
  - `object` string
  - `system_fingerprint` string
  - `usage` SchemasUsage
    - `completion_tokens` integer
    - `prompt_tokens` integer
    - `total_tokens` integer

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `415` — Unsupported Media Type
- `500` — Internal Server Error

## Changes

- **2025-10-30** `f59a2fe653b8` — 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `Bearer` was added to the API

[Change history](https://skmtc.dev/arcadeai/apis/arcade-api/changes/v1/chat/completions/post.md)

---

[API](https://skmtc.dev/arcadeai/apis/arcade-api.md) · [All operations](https://skmtc.dev/arcadeai/apis/arcade-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arcadeai/arcade-api/revisions/a509111298b2/schema)
