Quick Start
Get up and running with the Pixwith.AI API in just a few minutes!
Prerequisites
- A Pixwith.AI account (Sign up here )
- Your API key (found in your dashboard)
- Basic knowledge of HTTP requests and JSON
Step 1: Get Your API Key
- Sign up at pixwith.ai
- Navigate to your dashboard
- Go to “API Keys” section
- Generate a new API key
- Copy and securely store your API key
Step 2: Choose Your First Model
For this quick start, we’ll use Flux Dev (Text to Image):
- Model ID:
0-1 - Cost: 1 credit per image
- Speed: ~3 seconds
- Quality: High
Step 3: Create Your First Image
Request
curl -X POST https://api.pixwith.ai/api/task/create \
-H "Content-Type: application/json" \
-H "Api-Key: your_api_key_here" \
-d '{
"prompt": "a cute cat sitting on a rainbow",
"model_id": "0-1",
"options": {
"prompt_optimization": true,
"aspect_ratio": "1:1",
"num_outputs": 1
}
}'Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 3
}
}Step 4: Get Your Results
Request
curl -X POST https://api.pixwith.ai/api/task/get \
-H "Content-Type: application/json" \
-H "Api-Key: your_api_key_here" \
-d '{
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d"
}'Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"status": 2,
"result_urls": [
"https://cdn.pixwith.ai/images/d425ab4dc256f0ebaa84862b9cea8a3d_0.jpeg"
]
}
}Step 5: Understanding the Response
status: Task status1= Processing2= Completed3= Failed
result_urls: Array of generated image URLstask_id: Unique identifier for your task
Next Steps
Now that you’ve created your first image, explore more from API Documentation
Need Help?
- 📖 Documentation: Browse our comprehensive API docs
- 💬 Support: Contact us at [email protected]
- 🚀 Examples: Check out our code examples and tutorials
Happy creating with Pixwith.AI! 🎨
Last updated on