--- title: 'Bio Optimization Agent' description: 'Bio Optimization Agent API with Multi-Language Support' --- # Bio Optimization Agent The Bio Optimization Agent uses advanced AI to rewrite and optimize user dating profile bios, making them more engaging and attractive. The agent supports **35+ languages** and provides structured responses with headlines, conversation prompts, and improvement suggestions. ## 🚀 Endpoints ### Bio Rewrite **POST** `/api/v1/ai-agents/bio/rewrite` Completely rewrites a user's bio with improved engagement potential. ### Bio Optimize **POST** `/api/v1/ai-agents/bio/optimize` Optimizes an existing bio while maintaining the user's core message. ## 📝 Request Format ### Bio Rewrite Request ```json { "currentBio": "I like to travel and meet new people", "interests": ["travel", "music", "sports", "cooking"], "targetAudience": "adventurous people", "tone": "friendly", "maxLength": 200, "language": "en" } ``` ### Bio Optimize Request ```json { "currentBio": "I enjoy hiking and photography", "interests": ["outdoors", "photography", "coffee"], "targetAudience": "nature lovers", "tone": "casual", "maxLength": 150, "language": "es" } ``` ## 🔧 Request Parameters | Parameter | Type | Required | Description | Example | |-----------|------|----------|-------------|---------| | `currentBio` | string | ✅ | User's current bio text | "I like to travel and meet new people" | | `interests` | array[string] | ✅ | User's interests and hobbies | ["travel", "music", "sports"] | | `targetAudience` | string | ✅ | Desired audience for the bio | "adventurous people" | | `tone` | string | ✅ | Desired tone of the bio | "friendly", "casual", "professional" | | `maxLength` | integer | ✅ | Maximum character length | 200 | | `language` | string | ✅ | User's preferred language | "en", "es", "fr", "sw" | ### Supported Languages - **English (en)** - Default - **Spanish (es)** - Español - **French (fr)** - Français - **Swahili (sw)** - Kiswahili - **Arabic (ar)** - العربية - **Chinese (zh)** - 中文 - **Hindi (hi)** - हिन्दी - **Portuguese (pt)** - Português - **Russian (ru)** - Русский - **Japanese (ja)** - 日本語 - **Korean (ko)** - 한국어 - **German (de)** - Deutsch - **Italian (it)** - Italiano - And 20+ more languages... ## 📊 Response Format ### Success Response ```json { "success": true, "data": { "headline": "Adventure Seeker & Coffee Enthusiast", "bio": "Passionate traveler who believes the best stories happen over coffee. Always seeking new adventures and meaningful connections. Let's explore the world together, one conversation at a time.", "prompts": [ "What's the most adventurous thing you've done while traveling?", "If you could have coffee anywhere in the world, where would it be?", "What's your favorite travel story?" ], "improvements": [ "Add specific travel destinations you've visited", "Include a unique coffee experience you've had", "Mention what you're looking for in a partner" ], "confidence": 0.85 }, "timestamp": "2025-01-15T10:30:00Z" } ``` ### Multi-Language Response Examples #### Spanish Response ```json { "success": true, "data": { "headline": "Buscador de Aventuras y Entusiasta del Café", "bio": "Viajero apasionado que cree que las mejores historias suceden tomando café. Siempre buscando nuevas aventuras y conexiones significativas. Exploremos el mundo juntos, una conversación a la vez.", "prompts": [ "¿Cuál es la cosa más aventurera que has hecho mientras viajas?", "Si pudieras tomar café en cualquier lugar del mundo, ¿dónde sería?", "¿Cuál es tu historia de viaje favorita?" ], "improvements": [ "Agrega destinos de viaje específicos que has visitado", "Incluye una experiencia única de café que hayas tenido", "Menciona lo que buscas en una pareja" ], "confidence": 0.85 } } ``` #### French Response ```json { "success": true, "data": { "headline": "Chercheur d'Aventures et Passionné de Café", "bio": "Voyageur passionné qui croit que les meilleures histoires se passent autour d'un café. Toujours à la recherche de nouvelles aventures et de connexions significatives. Explorons le monde ensemble, une conversation à la fois.", "prompts": [ "Quelle est la chose la plus aventureuse que vous ayez faite en voyageant?", "Si vous pouviez prendre un café n'importe où dans le monde, où serait-ce?", "Quelle est votre histoire de voyage préférée?" ], "improvements": [ "Ajoutez des destinations de voyage spécifiques que vous avez visitées", "Incluez une expérience de café unique que vous avez eue", "Mentionnez ce que vous recherchez chez un partenaire" ], "confidence": 0.85 } } ``` ## 🔍 Response Fields | Field | Type | Description | Example | |-------|------|-------------|---------| | `headline` | string | Attention-grabbing headline | "Adventure Seeker & Coffee Enthusiast" | | `bio` | string | Optimized bio text | "Passionate traveler who believes..." | | `prompts` | array[string] | Conversation starter suggestions | ["What's the most adventurous..."] | | `improvements` | array[string] | Suggestions for further optimization | ["Add specific travel destinations..."] | | `confidence` | float | AI confidence score (0.0-1.0) | 0.85 | ## 🧪 Testing Examples ### English Bio Rewrite ```bash curl -X POST "https://agents.joinwink.app/api/v1/ai-agents/bio/rewrite" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "currentBio": "I like to travel and meet new people", "interests": ["travel", "music", "sports"], "targetAudience": "adventurous people", "tone": "friendly", "maxLength": 200, "language": "en" }' ``` ### Spanish Bio Optimization ```bash curl -X POST "https://agents.joinwink.app/api/v1/ai-agents/bio/optimize" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "currentBio": "Me gusta viajar y conocer gente nueva", "interests": ["viajes", "música", "deportes"], "targetAudience": "personas aventureras", "tone": "amigable", "maxLength": 200, "language": "es" }' ``` ### French Bio Rewrite ```bash curl -X POST "https://agents.joinwink.app/api/v1/ai-agents/bio/rewrite" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "currentBio": "J'aime voyager et rencontrer de nouvelles personnes", "interests": ["voyage", "musique", "sport"], "targetAudience": "personnes aventureuses", "tone": "amical", "maxLength": 200, "language": "fr" }' ``` ## 🔗 Integration Examples ### JavaScript/TypeScript ```typescript class BioOptimizationService { private baseURL = 'https://agents.joinwink.app/api/v1/ai-agents'; private apiKey: string; constructor(apiKey: string) { this.apiKey = apiKey; } async rewriteBio(bio: string, interests: string[], language: string = 'en'): Promise { const response = await fetch(`${this.baseURL}/bio/rewrite`, { method: 'POST', headers: { 'Authorization': `Bearer ${this.apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ currentBio: bio, interests, targetAudience: 'dating', tone: 'friendly', maxLength: 200, language }) }); return response.json(); } async optimizeBio(bio: string, interests: string[], language: string = 'en'): Promise { const response = await fetch(`${this.baseURL}/bio/optimize`, { method: 'POST', headers: { 'Authorization': `Bearer ${this.apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ currentBio: bio, interests, targetAudience: 'dating', tone: 'friendly', maxLength: 200, language }) }); return response.json(); } } ``` ### React Native ```javascript class BioOptimizationService { constructor(apiKey) { this.baseURL = 'https://agents.joinwink.app/api/v1/ai-agents'; this.apiKey = apiKey; } async rewriteBio(bio, interests, language = 'en') { const response = await fetch(`${this.baseURL}/bio/rewrite`, { method: 'POST', headers: { 'Authorization': `Bearer ${this.apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ currentBio: bio, interests, targetAudience: 'dating', tone: 'friendly', maxLength: 200, language }) }); return response.json(); } } ``` ## 🚀 Best Practices ### 1. Language Handling - **Always specify language**: Include user's language preference in every request - **Fallback strategy**: Handle cases where language is not specified - **Consistent experience**: Maintain language consistency across user sessions ### 2. Bio Optimization - **Provide context**: Include interests and target audience for better results - **Set appropriate tone**: Choose tone that matches user's personality - **Length constraints**: Set realistic maxLength based on platform requirements ### 3. Error Handling - **Validate input**: Ensure bio text meets minimum length requirements - **Handle failures**: Provide fallback content when AI optimization fails - **User feedback**: Inform users about optimization progress and results ## ⚠️ Error Handling ### Common Errors | Error Code | Description | Solution | |------------|-------------|----------| | `invalid_bio_length` | Bio text too short or too long | Ensure bio is between 10-500 characters | | `invalid_language` | Unsupported language code | Use supported language codes (en, es, fr, etc.) | | `missing_interests` | No interests provided | Include at least 2-3 user interests | | `invalid_tone` | Unsupported tone value | Use supported tones: friendly, casual, professional | ### Error Response Example ```json { "success": false, "error": { "code": "invalid_bio_length", "message": "Bio text must be between 10 and 500 characters", "details": "Current bio length: 5 characters", "language": "en" }, "timestamp": "2025-01-15T10:30:00Z" } ``` ## 📈 Rate Limits - **Standard Plan**: 100 requests/hour - **Premium Plan**: 500 requests/hour - **Enterprise Plan**: 2000 requests/hour ## 🔮 Advanced Features ### Context-Aware Optimization - **User History**: Considers previous bio versions and user feedback - **Platform Optimization**: Tailors content for specific dating platforms - **Audience Targeting**: Optimizes for specific demographic preferences ### Quality Assurance - **Confidence Scoring**: Provides reliability metrics for each optimization - **Fallback Mechanisms**: Ensures response quality even with AI limitations - **Continuous Learning**: Improves results based on user interactions --- **Next**: [Match Prediction Agent](/api-reference/ai-agents/match-prediction) | [Chat Response Agent](/api-reference/ai-agents/chat-response)