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
gatewayDelete()
AI Gateway DELETE
public
gatewayDelete(int $userId, int $aiProviderId, string $path) : AiGatewayResponse|null
Parameters
- $userId : int
- $aiProviderId : int
- $path : string
-
Raw provider API path after
/gateway/(e.g.chat/completions)
Tags
Return values
AiGatewayResponse|nullgatewayGet()
AI Gateway GET
public
gatewayGet(int $userId, int $aiProviderId, string $path) : AiGatewayResponse|null
Parameters
- $userId : int
- $aiProviderId : int
- $path : string
-
Raw provider API path after
/gateway/(e.g.chat/completions)
Tags
Return values
AiGatewayResponse|nullgatewayPatch()
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
Return values
AiGatewayResponse|nullgatewayPost()
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
Return values
AiGatewayResponse|nullgatewayPut()
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