Prerequisites
- A Kling AI account
- Access to Kling AI API
Getting Your API Key
- Visit the Kling AI website
- Sign in to your account or create a new one
- Navigate to your account settings or API section
- Click “Generate API Key” or “Create new API key”
- Give your API key a descriptive name
- Copy the generated API key (you’ll only see it once)
API Features
Kling AI provides various AI-powered services:Text Generation
- Text completion - Generate text continuations
- Text summarization - Summarize long documents
- Text classification - Categorize text content
- Text translation - Translate between languages
Conversational AI
- Chat completion - Interactive conversations
- Context-aware responses - Maintain conversation context
- Multi-turn dialogues - Handle complex conversations
- Personality customization - Customize AI personality
Content Generation
- Creative writing - Generate stories, articles, and content
- Code generation - Generate code snippets and functions
- Documentation - Create technical documentation
- Email composition - Draft professional emails
Setting Up in Jinba Flow
- Go to your workspace settings in Jinba Flow
- Navigate to the “Secret” section
- Find “Kling” in the list of available credentials
- Click “Configure” or “Add New”
- Enter your Kling AI API key in the designated field
- Click “Save” to store your credentials
Usage
Once configured, you can use Kling AI in your flows to:- Generate text completions and responses
- Create conversational AI experiences
- Summarize documents and content
- Translate text between languages
- Generate creative content and stories
- Create technical documentation
- Draft professional communications
API Endpoints
Text Generation
- Complete text - Generate text continuations
- Summarize text - Create document summaries
- Classify text - Categorize content
- Translate text - Convert between languages
Chat and Conversation
- Chat completion - Interactive conversations
- Context management - Handle conversation context
- Personality settings - Customize AI behavior
- Multi-turn dialogue - Complex conversation handling
Content Creation
- Creative writing - Generate stories and articles
- Code generation - Create code snippets
- Documentation - Generate technical docs
- Email drafting - Compose professional emails
Model Parameters
Text Generation
- Temperature - Controls randomness (0.0 to 1.0)
- Max tokens - Maximum response length
- Top p - Nucleus sampling parameter
- Frequency penalty - Reduce repetitive content
- Presence penalty - Encourage diverse topics
Chat Parameters
- System prompt - Define AI behavior and role
- User message - Input from the user
- Conversation history - Previous messages
- Response format - Structured or free-form
Content Parameters
- Style - Writing style and tone
- Length - Desired output length
- Format - Output format (markdown, plain text, etc.)
- Language - Target language for generation