跳转到主要内容
POST
Chat Completions

请求规范

  • 方法与路径: POST /apis/v1/parallel/chat/completions
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/parallel/chat/completions
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

请求费用。 默认请求预估费用:$0.01 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json

Request for the chat completions endpoint.

Note that all parameters except for model, stream, and response_format are ignored.

messages
ChatMessage · object[]
必填

The messages to use for chat completions.

Minimum array length: 1
model
enum<string>
必填

The model to use for chat completions.

可用选项:
base,
core,
lite,
speed
frequency_penalty
number | null

The frequency penalty to use for chat completions. Unsupported.

max_tokens
integer | null

The maximum number of tokens to generate. Unsupported.

n
integer | null

The number of chat completions to generate. Unsupported.

presence_penalty
number | null

The presence penalty to use for chat completions. Unsupported.

previous_interaction_id
string | null

Interaction ID from a previous chat completion to use as context.

response_format
ResponseFormatText · object

Default response format. Used to generate text responses.

stream
boolean | null

Whether to stream the chat completions.

temperature
number | null

The temperature to use for chat completions. Unsupported.

top_p
number | null

The top p to use for chat completions. Unsupported.

响应

Returns a ChatCompletion object for non-streaming requests (application/json), or a stream of ChatCompletionResponseChunk objects for streaming requests (text/event-stream) when stream=true is set in the request.

Chat completion response.

choices
Choice · object[]
必填
created
integer
必填
id
string
必填

The id of the chat completion.

model
string
必填
object
string
必填
Allowed value: "chat.completion"
basis
FieldBasis · object[]

Basis for the chat completion, including citations and reasoning supporting the output.

interaction_id
string | null

Identifier for this interaction. Pass as previous_interaction_id for follow-ups.

moderation
Moderation · object | null

Moderation results for the request input and generated output, if moderated completions were requested.

service_tier
enum<string> | null
可用选项:
auto,
default,
flex,
scale,
priority
system_fingerprint
string | null
usage
CompletionUsage · object | null

Usage statistics for the completion request.