TEV2 API Documentation
Overview
TEV2 (Theme Explorer v2) is the second iteration of the theme explorer algorithm designed to make human-like digital art creation accessible and seamless. Created by Asycd, it is a trademark tool used to create digital art showcased at events, create canvases, article covers, and stock images for content creation.
You can request a FREE access token here.
What is TEV2 and Why is it Useful?
TEV2 is an advanced AI-powered image generation system that transforms simple text themes into vivid, detailed art descriptions, which are then used to generate high-quality images using Stable Diffusion 3.5 models. The system makes digital art creation accessible to anyone, regardless of artistic skill, by providing an intuitive interface between human imagination and AI image generation.
Key Benefits:
- Accessibility: No artistic skills required
- Creativity: Transform abstract concepts into visual art
- Quality: Uses state-of-the-art Stable Diffusion 3.5 models
- Flexibility: Choose between Medium and Large models for different quality/speed trade-offs
- Simplicity: Easy-to-use API with minimal parameters
- Ownership: Users own all generated images
How Does the Algorithm Work?
The TEV2 algorithm operates through a sophisticated multi-stage process:
1. Theme Input Processing: Takes user input themes (e.g., "ultimate sadness" or "euphoria")
2. Multi-Source Enrichment: Enriches themes using data from:
- Reddit discussions and trends
- Twitter conversations and hashtags
- Quora questions and answers
- General web search results
3. Agentic Processing: A 24/7 agent maintains a constant stream of new visual ideas
4. Systems Theory Integration: Combines systems theory and combinatorics for description generation
5. Image Generation: Uses the enriched description with Stable Diffusion 3.5 models
The algorithm ensures that each generation remains fresh and unique by continuously updating its knowledge base with current trends and visual concepts.
How to Use?
API Endpoint
https://api.asycd.online/generate-image-simple
- prompt (required): Text description of the image you want to generate - model_size (optional): Choose between "medium" or "large" models (defaults to "medium")
Endpoint Arguments
Request Examples
import requests response = requests.post( "https://api.asycd.online/generate-image-simple", headers={"Authorization": "YOUR_API_TOKEN"}, data={ "prompt": "a majestic dragon in a fantasy landscape", "model_size": "large" } )
Python
const response = await fetch("https://api.asycd.online/generate-image-simple", { method: "POST", headers: { "Authorization": "YOUR_API_TOKEN" }, body: new FormData([ ["prompt", "a majestic dragon in a fantasy landscape"], ["model_size", "large"] ]) });
Javascript
const request: ImageRequest = { prompt: "a majestic dragon in a fantasy landscape", model_size: "large" }; const response = await fetch("https://api.asycd.online/generate-image-simple", { method: "POST", headers: { "Authorization": "YOUR_API_TOKEN" }, body: new FormData([ ["prompt", request.prompt], ["model_size", request.model_size!] ]) });
Typescript
Response Format: { "success": true, "image_base64": "iVBORw0KGgoAAAANSUhEUgAA...", "filename": "sd35_a_beautiful_sunset_over_mountains_1234567890.png", "generation_time": 43.57, "error": null }
Response Data
Response Fields
- success: Boolean indicating if generation was successful
- Image_base64: Base64-encoded PNG image data
- filename: Generated filename for the image
- generation_time: Time taken to generate the image in seconds
- error: Error message if generation failed (null on success)
Model Guidance
Medium Model
- Use Case: Faster generation, good quality for most applications
- Speed: ~15-45 seconds
- Quality: High quality suitable for most use cases
- Resource: Lower computational requirements
Large Model
- Use Case: Highest quality, professional applications
- Speed: ~30-90 seconds
- Quality: Exceptional detail and artistic quality
- Resource: Higher computational requirements
FULL IMPLEMENTATION (Python)
import requests import base64 from PIL import Image from io import BytesIO # API configuration API_BASE_URL = "https://api.asycd.online" API_TOKEN = "your_api_token_here" def generate_image(prompt, model_size="medium"): """Generate an image using TEV2 API""" headers = {"Authorization": f"Bearer {API_TOKEN}"} data = { "prompt": prompt, "model_size": model_size } response = requests.post( f"{API_BASE_URL}/generate-image-simple", data=data, headers=headers, timeout=300 ) if response.status_code == 200: result = response.json() if result.get("success"): # Decode base64 image image_data = base64.b64decode(result["image_base64"]) image = Image.open(BytesIO(image_data)) # Save the image filename = f"generated_{model_size}_{int(time.time())}.png" image.save(filename) print(f"✅ Image generated successfully!") print(f"⏱️ Time: {result['generation_time']} seconds") print(f"📁 Saved as: {filename}") return result else: print(f"❌ Generation failed: {result.get('error')}") return None else: print(f"❌ HTTP Error: {response.status_code}") return None # Example usage result = generate_image("a cyberpunk city at night", "large")