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)
-
Add AI Prompt
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.post
def add_ai_provider(self, userId: int, request_data: AddAIProviderReqeustScheme)
-
Add AI Provider
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.post
def create_ai_proxy_chat_completion(self, userId: int, aiProviderId: int, request_data: Union[GoogleGeminiChatProxy, OtherChatProxy])
-
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)
-
Delete AI Prompt
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.delete
def delete_ai_provider(self, userId: int, aiProviderId: int)
-
Delete AI Provider
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.delete
def edit_ai_prompt(self, userId: int, aiPromptId: int, request_data: Iterable[EditAIPromptScheme])
-
Edit AI Prompt
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.patch
def edit_ai_provider(self, userId: int, aiProviderId: int, request_data: EditAIProviderRequestScheme)
-
Edit AI Provider
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.patch
def get_ai_path(self, userId: int, aiPromptId: Optional[int] = None)
def get_ai_prompt(self, userId: int, aiPromptId: int)
-
Get AI Prompt
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.get
def get_ai_provider(self, userId: int, aiProviderId: int)
-
Get AI Provider
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.get
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)
-
List AI Prompts
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.ai.prompts.getMany
def list_ai_provider_models(self, userId: int, aiProviderId: int)
-
List AI Provider Models
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.ai.providers.models.getMany
def list_ai_providers(self, userId: int, limit: Optional[int] = None, offset: Optional[int] = None)
-
List AI Providers
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.ai.providers.getMany
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)
-
Add AI Prompt
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.prompts.post
def add_ai_provider(self, request_data: AddAIProviderReqeustScheme)
-
Add AI Provider
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.providers.post
def create_ai_proxy_chat_completion(self, aiProviderId: int, request_data: Union[GoogleGeminiChatProxy, OtherChatProxy])
-
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)
-
Delete AI Prompt
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.prompts.delete
def delete_ai_provider(self, aiProviderId: int)
-
Delete AI Provider
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.providers.delete
def edit_ai_prompt(self, aiPromptId: int, request_data: Iterable[EditAIPromptScheme])
-
Edit AI Prompt
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.prompts.patch
def edit_ai_provider(self, aiProviderId: int, request_data: EditAIProviderRequestScheme)
-
Edit AI Provider
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.providers.patch
def get_ai_path(self, aiPromptId: Optional[int] = None)
def get_ai_prompt(self, aiPromptId: int)
-
Get AI Prompt
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.prompts.get
def get_ai_provider(self, aiProviderId: int)
-
Get AI Provider
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.providers.get
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)
-
List AI Prompts
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.prompts.getMany
def list_ai_provider_models(self, aiProviderId: int)
-
List AI Provider Models
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.ai.providers.models.getMany
def list_ai_providers(self, limit: Optional[int] = None, offset: Optional[int] = None)
-
List AI Providers
Link to documentation: https://developer.crowdin.com/enterprise/api/v2/#operation/api.ai.providers.getMany