API Documentation
Welcome to the Pomelo API documentation. Our API allows you to integrate advanced AI capabilities into your applications with simple HTTP requests.
Base URL
https://www.pomeloapi.com/v1/tasks
API Versioning
All API endpoints are versioned to ensure backward compatibility as we evolve our services. The current stable version is v1
.
Getting Started
To start using the Pomelo API, you'll need to:
- Sign up for an account on our website
- Generate an API key from your dashboard
- Include your API key in the Authorization header of your requests
Important
Keep your API keys secure and never expose them in client-side code or public repositories.
What's Next?
Explore our documentation to learn more about:
- Authentication - Learn how to authenticate your API requests
- Client Libraries - Explore our SDKs for easy integration
- API References - Detailed documentation of all available endpoints
Examples
Text Generation
Generate text completions using our OpenAI integration.
# Python example import requests response = requests.post( "https://www.pomeloapi.com/v1/tasks", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, json={ "messages": [ {"role": "user", "content": "Hello!"} ], "model": "gpt-4" } ) print(response.json())
Image Generation
Create images using our Midjourney integration.
# Python example import requests response = requests.post( "https://www.pomeloapi.com/v1/tasks", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, json={ "model": "flux-dev", "prompt": "A beautiful sunset over mountains", "width": 1024, "height": 1024, "output_format": "png" } ) print(response.json())