Documentation

AiGatewayApi extends AbstractApi
in package

AI Gateway allows you to proxy requests to your AI provider through Crowdin, giving you a single place to manage keys, monitor usage, and control access.

Table of Contents

Methods

gatewayDelete()  : AiGatewayResponse|null
AI Gateway DELETE
gatewayGet()  : AiGatewayResponse|null
AI Gateway GET
gatewayPatch()  : AiGatewayResponse|null
AI Gateway PATCH
gatewayPost()  : AiGatewayResponse|null
AI Gateway POST
gatewayPut()  : AiGatewayResponse|null
AI Gateway PUT

Methods

gatewayPatch()

AI Gateway PATCH

public gatewayPatch(int $userId, int $aiProviderId, string $path, array<string|int, mixed> $data) : AiGatewayResponse|null
Parameters
$userId : int
$aiProviderId : int
$path : string

Raw provider API path after /gateway/ (e.g. chat/completions)

$data : array<string|int, mixed>

Request body forwarded to the AI provider

Tags
link

API Documentation

Return values
AiGatewayResponse|null

gatewayPost()

AI Gateway POST

public gatewayPost(int $userId, int $aiProviderId, string $path, array<string|int, mixed> $data) : AiGatewayResponse|null
Parameters
$userId : int
$aiProviderId : int
$path : string

Raw provider API path after /gateway/ (e.g. chat/completions)

$data : array<string|int, mixed>

Request body forwarded to the AI provider

Tags
link

API Documentation

Return values
AiGatewayResponse|null

gatewayPut()

AI Gateway PUT

public gatewayPut(int $userId, int $aiProviderId, string $path, array<string|int, mixed> $data) : AiGatewayResponse|null
Parameters
$userId : int
$aiProviderId : int
$path : string

Raw provider API path after /gateway/ (e.g. chat/completions)

$data : array<string|int, mixed>

Request body forwarded to the AI provider

Tags
link

API Documentation

Return values
AiGatewayResponse|null
On this page

Search results