Module crowdin_api.api_resources.ai.resource

Classes

class AIResource (requester: APIRequester, project_id: Optional[int] = None, page_size=25)

Resource for AI.

Link to documentation: https://developer.crowdin.com/api/v2/#tag/AI

Ancestors

Methods

def add_ai_prompt(self, userId: int, request_data: AddAIPromptRequestScheme)
def add_ai_provider(self, userId: int, request_data: AddAIProviderReqeustScheme)
def create_ai_proxy_chat_completion(self, userId: int, aiProviderId: int, request_data: Union[GoogleGeminiChatProxyOtherChatProxy])

Create AI Proxy Chat Completion

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.

Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.chat.completions.post

def delete_ai_prompt(self, userId: int, aiPromptId: int)
def delete_ai_provider(self, userId: int, aiProviderId: int)
def edit_ai_prompt(self, userId: int, aiPromptId: int, request_data: Iterable[EditAIPromptScheme])
def edit_ai_provider(self, userId: int, aiProviderId: int, request_data: EditAIProviderRequestScheme)
def get_ai_path(self, userId: int, aiPromptId: Optional[int] = None)
def get_ai_prompt(self, userId: int, aiPromptId: int)
def get_ai_provider(self, userId: int, aiProviderId: int)
def get_ai_provider_path(self, userId: int, aiProviderId: Optional[int] = None)
def list_ai_prompts(self, userId: int, projectId: Optional[int] = None, action: Optional[AIPromptAction] = None, limit: Optional[int] = None, offset: Optional[int] = None)
def list_ai_provider_models(self, userId: int, aiProviderId: int)
def list_ai_providers(self, userId: int, limit: Optional[int] = None, offset: Optional[int] = None)
class EnterpriseAIResource (requester: APIRequester, project_id: Optional[int] = None, page_size=25)

Enterprise Resource for AI.

Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#tag/AI

Ancestors

Methods

def add_ai_prompt(self, request_data: AddAIPromptRequestScheme)
def add_ai_provider(self, request_data: AddAIProviderReqeustScheme)
def create_ai_proxy_chat_completion(self, aiProviderId: int, request_data: Union[GoogleGeminiChatProxyOtherChatProxy])

Create AI Proxy Chat Completion

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.

Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.providers.chat.completions.post

def delete_ai_prompt(self, aiPromptId: int)
def delete_ai_provider(self, aiProviderId: int)
def edit_ai_prompt(self, aiPromptId: int, request_data: Iterable[EditAIPromptScheme])
def edit_ai_provider(self, aiProviderId: int, request_data: EditAIProviderRequestScheme)
def get_ai_path(self, aiPromptId: Optional[int] = None)
def get_ai_prompt(self, aiPromptId: int)
def get_ai_provider(self, aiProviderId: int)
def get_ai_provider_path(self, aiProviderId: Optional[int] = None)
def list_ai_prompts(self, projectId: Optional[int] = None, action: Optional[AIPromptAction] = None, limit: Optional[int] = None, offset: Optional[int] = None)
def list_ai_provider_models(self, aiProviderId: int)
def list_ai_providers(self, limit: Optional[int] = None, offset: Optional[int] = None)