---
title: "Create AI Proxy Chat Completion"
method: POST
path: "/ai/providers/{aiProviderId}/chat/completions"
tags: ["AI"]
deprecated: true
---

# Create AI Proxy Chat Completion

`POST /ai/providers/{aiProviderId}/chat/completions`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/ai/providers/{aiProviderId}/chat/completions`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/ai/providers/:aiProviderId/chat/completions/post.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

**Required scopes:** `ai.proxy` (Read only).

Deprecated. Use [AI Gateway](#operation/api.ai.providers.gateway.enterprise.post) instead.

This API method serves as an intermediary, forwarding your requests directly to the selected provider.

Please refer to the documentation for the specific provider you use to determine the required payload format.

__Note:__ The AI Gateway supports every provider type, all HTTP methods, and native SSE streaming. This endpoint is kept for compatibility and does not receive new capabilities

## Path parameters

- `aiProviderId` integer, required

## Request body

- union
  - object
    - `model` string, required: ID of the model to use.
    - `stream` boolean: Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: `[DONE]` message.
  - object
    - `stream` boolean: Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: `[DONE]` message.

## Response `201`

AI Proxy Chat Completion was created successfully

- AiProxyChatCompletionResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` unknown, required

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: AI provider with specified id was not found
- `405`: Method Not Allowed

---

[API](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/revisions/dc68744c5384?raw)
