APIPASS API Marketplace Chat Completions API
The Chat Completions API from APIPASS API Marketplace — 1 operation(s) for chat completions.
The Chat Completions API from APIPASS API Marketplace — 1 operation(s) for chat completions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/apipass:apipass-chat-completions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: ApiPass Platform Chat API
version: 1.0.0
tags:
- name: Chat Completions
paths:
/v1/chat/completions:
post:
tags:
- Chat Completions
summary: Create Chat Completion
description: 'OpenAI兼容的聊天补全API
复用Jobs API的架构:
- 请求前固定预扣 100 credits,避免按 token 模型在请求前无法准确知道成本
- 记录到tasks表
- 请求完成后按 input/output/cache_read tokens 和 model_credit_rules.token_prices 结算'
operationId: create_chat_completion_v1_chat_completions_post
parameters:
- name: authorization
in: header
required: true
schema:
type: string
description: Bearer YOUR_API_KEY
title: Authorization
description: Bearer YOUR_API_KEY
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
InputAudioContent:
properties:
type:
type: string
const: input_audio
title: Type
default: audio_url
input_audio:
$ref: '#/components/schemas/InputAudio'
type: object
required:
- input_audio
title: InputAudioContent
description: 音频内容
TextContent:
properties:
type:
type: string
const: text
title: Type
default: text
text:
type: string
title: Text
type: object
required:
- text
title: TextContent
description: 文本内容
ImageUrl:
properties:
url:
type: string
title: Url
type: object
required:
- url
title: ImageUrl
description: 图片URL
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
Tool:
properties:
type:
type: string
title: Type
description: 工具类型,如 'function'
function:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Function
description: 函数定义
type: object
required:
- type
title: Tool
description: 工具定义
InputAudio:
properties:
data:
type: string
title: Data
format:
type: string
title: Format
type: object
required:
- data
- format
title: InputAudio
description: 音频输入
ChatCompletionRequest:
properties:
model:
type: string
title: Model
description: 模型名称
messages:
items:
$ref: '#/components/schemas/Message'
type: array
title: Messages
description: 消息列表
stream:
type: boolean
title: Stream
description: 是否流式返回
default: false
temperature:
anyOf:
- type: number
maximum: 2.0
minimum: 0.0
- type: 'null'
title: Temperature
description: 温度参数
max_tokens:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Tokens
description: 最大token数
max_completion_tokens:
anyOf:
- type: integer
exclusiveMinimum: 0.0
- type: 'null'
title: Max Completion Tokens
description: 最大输出 token 数(max_tokens 的兼容别名)
top_p:
anyOf:
- type: number
maximum: 1.0
minimum: 0.0
- type: 'null'
title: Top P
description: 核采样参数
frequency_penalty:
anyOf:
- type: number
maximum: 2.0
minimum: -2.0
- type: 'null'
title: Frequency Penalty
description: 频率惩罚
presence_penalty:
anyOf:
- type: number
maximum: 2.0
minimum: -2.0
- type: 'null'
title: Presence Penalty
description: 存在惩罚
tools:
anyOf:
- items:
$ref: '#/components/schemas/Tool'
type: array
- type: 'null'
title: Tools
description: 工具列表(如 Google Search)
tool_choice:
anyOf:
- type: string
- additionalProperties: true
type: object
- type: 'null'
title: Tool Choice
description: 工具选择策略
parallel_tool_calls:
anyOf:
- type: boolean
- type: 'null'
title: Parallel Tool Calls
description: 是否允许并行工具调用
memory:
anyOf:
- type: boolean
- type: 'null'
title: Memory
description: 是否启用对话记忆
default: false
include_thoughts:
anyOf:
- type: boolean
- type: 'null'
title: Include Thoughts
description: 是否包含思考过程
default: false
reasoning_effort:
anyOf:
- type: string
enum:
- low
- medium
- high
- xhigh
- type: 'null'
title: Reasoning Effort
description: 推理强度
response_format:
anyOf:
- $ref: '#/components/schemas/ResponseFormat'
- type: 'null'
description: 响应格式(如结构化输出)
channel:
anyOf:
- type: string
enum:
- auto
- regular
- official
- type: 'null'
title: Channel
description: 'ApiPass API channel: auto tries regular then official; explicit channels disable fallback'
default: auto
channel_type:
anyOf:
- type: string
enum:
- auto
- regular
- official
- type: 'null'
title: Channel Type
description: Alias for channel
_provider_config_id:
anyOf:
- type: string
- type: 'null'
title: Provider Config Id
description: 可选,指定 provider_model_configs.id 强制路由到某个 Provider 配置
_provider_route_id:
anyOf:
- type: string
- type: 'null'
title: Provider Route Id
description: 指定 provider_model_routes.id;不可用时直接失败,不回退其他路由
type: object
required:
- model
- messages
title: ChatCompletionRequest
description: OpenAI兼容的聊天补全请求
VideoUrl:
properties:
url:
type: string
title: Url
type: object
required:
- url
title: VideoUrl
description: 视频URL
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ImageUrlContent:
properties:
type:
type: string
const: image_url
title: Type
default: image_url
image_url:
$ref: '#/components/schemas/ImageUrl'
type: object
required:
- image_url
title: ImageUrlContent
description: 图片URL内容(也可用于视频/音频URL)
VideoUrlContent:
properties:
type:
type: string
const: video_url
title: Type
default: video_url
video_url:
$ref: '#/components/schemas/VideoUrl'
type: object
required:
- video_url
title: VideoUrlContent
description: 视频URL内容
ResponseFormat:
properties:
type:
type: string
title: Type
description: 格式类型,如 'json_schema'
json_schema:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Json Schema
description: JSON Schema 定义
type: object
required:
- type
title: ResponseFormat
description: 响应格式定义
Message:
properties:
role:
type: string
enum:
- developer
- system
- user
- assistant
- tool
title: Role
description: 角色
content:
anyOf:
- type: string
- items:
anyOf:
- $ref: '#/components/schemas/TextContent'
- $ref: '#/components/schemas/ImageUrlContent'
- $ref: '#/components/schemas/VideoUrlContent'
- $ref: '#/components/schemas/InputAudioContent'
type: array
- type: 'null'
title: Content
description: 内容(字符串或多模态数组)
name:
anyOf:
- type: string
- type: 'null'
title: Name
description: 可选的消息名称
tool_calls:
anyOf:
- items:
additionalProperties: true
type: object
type: array
- type: 'null'
title: Tool Calls
description: 助手发起的工具调用
tool_call_id:
anyOf:
- type: string
- type: 'null'
title: Tool Call Id
description: 工具消息对应的调用 ID
type: object
required:
- role
title: Message
description: 聊天消息(支持多模态)
securitySchemes:
HTTPBearer:
type: http
scheme: bearer