முழுமையான ஏஐ உள்ளடக்க உருவாக்கும் API தொகுப்பு
ஒரே ஒருங்கிணைந்த API மூலம் 30+ முன்னணி ஏஐ மாதிரிகளை அணுகுங்கள். வீடியோக்கள், படங்கள், அவதார்கள் மற்றும் பேச்சை தொழில்துறை தரத்தில் உருவாக்குங்கள்.
உரை-வீடியோ APIகள்
உலகின் மிக முன்னேற்றமான AI வீடியோ மாதிரிகளுடன் உரை உந்துதல்களை அதிசயமான வீடியோக்களாக மாற்றுங்கள்
தொழில்துறை முன்னணி வீடியோ உருவாக்கம் 6 பதிப்புகளுடன் (1.0-2.1). ஸ்டாண்டர்ட் மற்றும் ப்ரோ முறைகள், 5-10 விநாடி வீடியோக்கள், சிறந்த இயக்க ஒத்திசைவு.
முன்னேற்றமடைந்த வீடியோ உருவாக்கம் சிறந்த காட்சி புரிதல் மற்றும் இயற்கை இயக்கத்துடன். கிடைக்கும் மாதிரிகள் Hailuo-02 மற்றும் HailuoI2V.
Google இன் சமீபத்திய வீடியோ மாதிரி, ஒப்பில்லா இயற்கை உண்மை மற்றும் இயற்பியல் துல்லியத்துடன். பிரீமியம் தரமான வெளியீடு.
Gen-2, Gen-3 மற்றும் Gen4 மாதிரிகளுடன் தொழில்முறை பட உருவாக்கம். சினிமா தரமான முடிவுகள்.
Dream Machine உடன் கலைமயமான வீடியோ உருவாக்கம். தனித்துவமான அழகியல் கொண்ட சுர்ரியலான மற்றும் படைப்பாற்றல் கொண்ட வீடியோக்கள் உருவாக்கவும்.
முன்னேற்றமடைந்த நடன உருவாக்கம் மற்றும் பலர் நடன ஒத்துழைப்பு ஆதரவு. குறிப்பு காட்சிகளிலிருந்து ஒத்திசைந்த நடன வீடியோக்கள் உருவாக்கவும்.
நிலையான 5 விநாடி கிளிப்புகளில் சிறப்பு. 480p மற்றும் 1080p தீர்மானங்களில் நம்பகமான தரமான வெளியீடு.
மின்-வர்த்தகத்தை மையமாகக் கொண்ட வீடியோ உருவாக்கம். தயாரிப்பு அறிமுகங்கள் மற்றும் மார்க்கெட்டிங் உள்ளடக்கத்திற்கு உகந்தது.
உரை-படம் APIகள்
நவீன டிஃப்யூஷன் மாதிரிகளை பயன்படுத்தி உரை விளக்கங்களில் இருந்து அதிசயமான படங்களை உருவாக்குங்கள்
Google's most advanced image model with photorealistic quality and exceptional prompt adherence. Multiple sub-models available.
விரைவான திருத்தங்களுக்கு வேகமான மேம்பாட்டு மாதிரி. மாதிரிப்புக்கு வேகம் மற்றும் தரத்திற்கு சரியான சமநிலை.
மேம்பட்ட விவரங்கள் மற்றும் கலை கட்டுப்பாடுடன் தொழில்முறை பட உருவாக்கம். சிறந்த நிலைத்தன்மை.
Enhanced version with improved prompt understanding and faster generation times. Better composition.
அதிகபட்ச தரமான பட உருவாக்கம். அதிக விவரம் மற்றும் தீர்மானம் தேவைப்படும் திட்டங்களுக்கு.
Specialized for context-aware generation with Pro and Max modes. Excellent for specific style requirements.
வேகமான உருவாக்கத்திற்கு பல தர நிலைகளுடன் மேம்படுத்தப்பட்ட Flux செயலாக்கம்.
சிறந்த கலை புரிதல் மற்றும் பாணி கட்டுப்பாடுடன் மேம்பட்ட சீன பட மாதிரி.
தொழில்துறை தரமான திறந்த மூல மாதிரி, விரிவான தனிப்பயன் விருப்பங்களுடன்.
படம்-வீடியோ APIகள்
நிலையான படங்களை புத்துணர்வு கொண்டு இயக்கம் மற்றும் அனிமேஷனுடன் உயிர்ப்பிக்கவும்
Transform images into smooth videos with natural motion. Multiple versions and quality modes available.
Professional image animation with Gen-2, Gen-3, and Gen4 models. Cinema-quality results.
அவதார், லிப் சிங்க் & TTS APIகள்
பேசும் அவதார்களை உருவாக்கி, சிறந்த ஒத்திசைவுடன் இயற்கையான பேச்சை உருவாக்குங்கள்
பாத்திர அனிமேஷன் சிறந்த ஒலி ஒத்திசைவு உடன். இயற்கையான முகபாவனைகள் மற்றும் இயக்கங்களுடன் உருவப்படங்களை உயிர்ப்பிக்கவும்.
மிக இயற்கையான AI குரல்கள், உணர்ச்சி கட்டுப்பாடு மற்றும் பல மொழிகளுடன்.
Google's neural text-to-speech with WaveNet voices. Over 380 voices in 50+ languages with SSML support.
ஒரு API, எல்லையற்ற வாய்ப்புகள்
🎯 பொது உருவாக்கம்
அனைத்து உள்ளடக்க வகைகளுக்கும் ஒரே 'generate' முறை - வீடியோ, படம், ஆடியோ, அவதார். ஒரே APIயுடன் உங்கள் இணைப்பை எளிமைப்படுத்துங்கள்.
🤖 புத்திசாலி வழங்குநர் தேர்வு
உங்கள் தேவைகளின் அடிப்படையில் சிறந்த வழங்குநரை எங்கள் AI தேர்வு செய்ய அனுமதிக்கவும், அல்லது முழு கட்டுப்பாட்டிற்கு விருப்பமான வழங்குநரை குறிப்பிடவும்.
🔄 Idempotent கோரிக்கைகள்
Idempotency-Key தலைப்புகளுடன் பாதுகாப்பான மறுஇயக்கங்கள். நெட்வொர்க் பிரச்சனைகளால் இரட்டை கட்டணங்களைப் பற்றி கவலைப்பட வேண்டாம்.
📊 புத்திசாலி வீத வரம்பிடல்
தெளிவான வீத வரம்பு தலைப்புகள் (X-RateLimit-*) உங்கள் கோரிக்கை நேரத்தை மேம்படுத்தவும் 429 பிழைகளைத் தவிர்க்கவும் உதவும்.
🔔 பாதுகாப்பான வெப்ஹூக்குகள்
பாதுகாப்பான அசிங்க் அறிவிப்புகளுக்கான HMAC-கையொப்பமிடப்பட்ட வெப்ஹூக்குகள். உங்கள் உள்ளடக்கம் தயாரானதும் அறிவிக்கப்படும்.
⚡ தெளிவான பிழை குறியீடுகள்
INSUFFICIENT_CREDITS மற்றும் RATE_LIMIT போன்ற இயந்திரம் படிக்கக்கூடிய பிழை குறியீடுகள் பிழைத்திருத்தத்தை எளிதாக்குகின்றன.
பொது பிழை குறியீடுகள்
| குறியீடு | விளக்கம் | செயல் |
|---|---|---|
| INSUFFICIENT_CREDITS | இந்த செயல்பாட்டிற்கு போதுமான கிரெடிட்ஸ் இல்லை | உங்கள் கணக்கு கிரெடிட்ஸை மேலேற்றவும் |
| RATE_LIMIT | மிக அதிகமான கோரிக்கைகள் | X-RateLimit-Reset தலைப்பை சரிபார்க்கவும் |
| INVALID_INPUT | தவறான அளவுருக்கள் வழங்கப்பட்டுள்ளன | உள்ளீட்டை ஸ்கீமாவுடன் சரிபார்க்கவும் |
| PROVIDER_UNAVAILABLE | தேர்ந்தெடுக்கப்பட்ட வழங்குநர் தற்காலிகமாக கிடைக்கவில்லை | மீண்டும் முயற்சிக்கவும் அல்லது auto-select ஐ பயன்படுத்தவும் |
| GENERATION_FAILED | உள்ளடக்க உருவாக்கம் தோல்வியடைந்தது | வேறு அளவுருக்களுடன் மீண்டும் முயற்சிக்கவும் |
திட்டத்தின்படி வீத வரம்புகள்
| திட்டம் | கோரிக்கைகள்/நிமிடம் | ஒரே நேரத்தில் | நாள் வரம்பு |
|---|---|---|---|
| Free | 10 | 1 | 100 |
| Starter | 30 | 3 | 1,000 |
| Pro | 60 | 10 | 10,000 |
| Enterprise | Custom | Custom | Unlimited |
விரைவான தொடக்க குறியீடு எடுத்துக்காட்டுகள்
# Universal generation API - Video example
curl -X POST https://api.doitong.com/graphql \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id-123" \
-d '{
"query": "mutation Generate($input: GenerateInput!) { generate(input: $input) { id status type provider url metadata { duration resolution } creditCost estimatedTime } }",
"variables": {
"input": {
"type": "VIDEO",
"provider": "minimax",
"input": {
"text": "A serene mountain landscape at sunset"
},
"options": {
"duration": 10,
"resolution": "1080p",
"style": "cinematic"
}
}
}
}'
# Auto-select best provider for quality
curl -X POST https://api.doitong.com/graphql \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation { generate(input: { type: VIDEO, input: { text: \"Epic dragon battle\" }, priority: QUALITY }) { id status provider creditCost } }"
}'
# Check generation status
curl -X POST https://api.doitong.com/graphql \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "query { generation(id: \"gen_abc123\") { status progress url error { code message } } }"
}'
// Doitong Universal API Client
class DoitongAPI {
constructor(apiKey) {
this.apiKey = apiKey;
this.endpoint = 'https://api.doitong.com/graphql';
}
async generate(input) {
const response = await fetch(this.endpoint, {
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID()
},
body: JSON.stringify({
query: `
mutation Generate($input: GenerateInput!) {
generate(input: $input) {
id
status
type
provider
url
metadata
creditCost
estimatedTime
error {
code
message
}
}
}
`,
variables: { input }
})
});
const data = await response.json();
// Check for rate limits
const remaining = response.headers.get('X-RateLimit-Remaining');
if (remaining && parseInt(remaining) < 10) {
console.warn(`Low rate limit: ${remaining} requests remaining`);
}
if (data.errors) {
throw new Error(data.errors[0].message);
}
return data.data.generate;
}
async checkStatus(id) {
const response = await fetch(this.endpoint, {
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: `
query GetGeneration($id: ID!) {
generation(id: $id) {
id
status
progress
url
error {
code
message
}
}
}
`,
variables: { id }
})
});
const data = await response.json();
return data.data.generation;
}
async waitForCompletion(id, pollInterval = 2000) {
while (true) {
const result = await this.checkStatus(id);
if (result.status === 'COMPLETED') {
return result;
} else if (result.status === 'FAILED') {
throw new Error(result.error?.message || 'Generation failed');
}
await new Promise(resolve => setTimeout(resolve, pollInterval));
}
}
}
// Usage examples
const api = new DoitongAPI('YOUR_API_KEY');
// Simple video generation - let AI choose provider
const video = await api.generate({
type: 'VIDEO',
input: { text: 'A serene mountain landscape' }
});
// Specific provider with options
const video = await api.generate({
type: 'VIDEO',
provider: 'minimax',
input: { text: 'Epic battle scene' },
options: {
duration: 10,
resolution: '1080p',
style: 'cinematic'
}
});
// Image generation with auto-provider selection for quality
const image = await api.generate({
type: 'IMAGE',
input: { text: 'Photorealistic portrait' },
priority: 'QUALITY'
});
// Wait for completion
const result = await api.waitForCompletion(video.id);
console.log('Video ready:', result.url);
// Using Apollo Client for GraphQL
import { ApolloClient, gql } from '@apollo/client';
const CREATE_VIDEO = gql`
mutation CreateVideo($input: VideoCreateInput!) {
videoCreate(input: $input) {
id
status
videoUrl
}
}
`;
const client = new ApolloClient({
uri: 'https://api.doitong.com/graphql',
headers: {
authorization: 'Bearer YOUR_API_KEY'
}
});
const result = await client.mutate({
mutation: CREATE_VIDEO,
variables: {
input: {
prompt: 'Beautiful sunset over ocean',
model: 'luma',
duration: 9
}
}
});
import requests
import time
import json
import uuid
from typing import Dict, Optional, Any
class DoitongAPI:
def __init__(self, api_key: str):
self.api_key = api_key
self.base_url = "https://api.doitong.com/graphql"
self.headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def generate(self,
content_type: str,
input_data: Dict[str, Any],
provider: Optional[str] = None,
options: Optional[Dict] = None,
idempotency_key: Optional[str] = None) -> Dict:
"""Universal generation method for all content types"""
# Add idempotency key for safe retries
headers = self.headers.copy()
if idempotency_key:
headers["Idempotency-Key"] = idempotency_key
else:
headers["Idempotency-Key"] = str(uuid.uuid4())
query = """
mutation Generate($input: GenerateInput!) {
generate(input: $input) {
id
status
type
provider
url
metadata
creditCost
estimatedTime
error
errorCode
}
}
"""
variables = {
"input": {
"type": content_type.upper(),
"input": input_data
}
}
if provider:
variables["input"]["provider"] = provider
if options:
variables["input"]["options"] = options
response = requests.post(
self.base_url,
headers=headers,
json={"query": query, "variables": variables}
)
# Handle rate limiting
if response.status_code == 429:
retry_after = response.headers.get("X-RateLimit-Reset", 60)
raise Exception(f"Rate limited. Retry after {retry_after} seconds")
data = response.json()
if "errors" in data:
error = data["errors"][0]
raise Exception(f"API Error: {error.get('message', 'Unknown error')}")
return data["data"]["generate"]
def check_status(self, generation_id: str) -> Dict:
"""Check the status of a generation"""
query = """
query GetGeneration($id: ID!) {
generation(id: $id) {
id
status
type
url
progress
error
errorCode
metadata
}
}
"""
response = requests.post(
self.base_url,
headers=self.headers,
json={
"query": query,
"variables": {"id": generation_id}
}
)
return response.json()["data"]["generation"]
def wait_for_completion(self, generation_id: str, max_wait: int = 300) -> Dict:
"""Poll until generation is complete"""
start_time = time.time()
while time.time() - start_time < max_wait:
result = self.check_status(generation_id)
if result["status"] == "completed":
return result
elif result["status"] == "failed":
error_code = result.get("errorCode", "UNKNOWN_ERROR")
error_msg = result.get("error", "Generation failed")
raise Exception(f"[{error_code}] {error_msg}")
# Adaptive polling - start fast, slow down over time
wait_time = 2 if time.time() - start_time < 30 else 5
time.sleep(wait_time)
raise TimeoutError("Generation timed out")
# Example usage
if __name__ == "__main__":
api = DoitongAPI("YOUR_API_KEY")
try:
# Generate a video (auto-selects best provider)
video = api.generate(
content_type="video",
input_data={"text": "A majestic eagle soaring through clouds"},
options={"duration": 10, "resolution": "1080p"}
)
print(f"Video generation started: {video['id']}")
# Wait for completion
result = api.wait_for_completion(video['id'])
print(f"Video ready: {result['url']}")
print(f"Credits used: {result['creditCost']}")
# Generate with specific provider
image = api.generate(
content_type="image",
provider="flux-ultra",
input_data={"text": "Professional product photography"},
options={"aspectRatio": "16:9", "quality": "ultra"}
)
# Generate audio/TTS
audio = api.generate(
content_type="audio",
provider="elevenlabs",
input_data={"text": "Welcome to the future of AI"},
options={"voice": "rachel", "emotion": "excited"}
)
except Exception as e:
print(f"Error: {e}")
# Universal generation mutation - works for all content types
mutation Generate($input: GenerateInput!) {
generate(input: $input) {
id
status
type
provider
url
metadata
creditCost
estimatedTime
progress
error
errorCode
}
}
# Example: Generate video (auto-select provider)
# Variables:
{
"input": {
"type": "VIDEO",
"input": {
"text": "A bustling Tokyo street at night with neon lights"
},
"options": {
"duration": 10,
"resolution": "1080p",
"style": "cinematic"
}
}
}
# Example: Generate video with specific provider
# Variables:
{
"input": {
"type": "VIDEO",
"provider": "kling",
"input": {
"text": "Epic space battle scene"
},
"options": {
"mode": "pro",
"duration": 10,
"aspectRatio": "16:9"
}
}
}
# Example: Image-to-video generation
# Variables:
{
"input": {
"type": "VIDEO",
"provider": "runway",
"input": {
"text": "Make the character dance",
"image": "https://example.com/character.jpg"
},
"options": {
"motionIntensity": "high",
"model": "gen-3"
}
}
}
# Example: Generate image
# Variables:
{
"input": {
"type": "IMAGE",
"provider": "flux-ultra",
"input": {
"text": "Photorealistic portrait in Rembrandt style"
},
"options": {
"aspectRatio": "16:9",
"quality": "ultra",
"seed": 42
}
}
}
# Example: Generate audio/TTS
# Variables:
{
"input": {
"type": "AUDIO",
"provider": "elevenlabs",
"input": {
"text": "Welcome to the future of artificial intelligence"
},
"options": {
"voice": "rachel",
"emotion": "excited",
"speed": 1.0
}
}
}
# Example: Generate avatar video
# Variables:
{
"input": {
"type": "AVATAR",
"provider": "heygen",
"input": {
"text": "Hello, I'm your AI assistant",
"voice": "professional_female"
},
"options": {
"avatarId": "kate",
"background": "modern_office",
"gesture": "friendly"
},
"webhookUrl": "https://your-app.com/webhook"
}
}
# Query generation status
query GetGeneration($id: ID!) {
generation(id: $id) {
id
status
type
provider
url
progress
metadata {
width
height
duration
format
}
creditCost
error
errorCode
createdAt
completedAt
}
}
# Cancel a generation
mutation CancelGeneration($id: ID!) {
cancelGeneration(id: $id)
}
# Get available providers for a content type
query GetProviders($type: GenerationType!) {
providers(type: $type) {
id
name
description
features
limitations
pricing {
creditCost
estimatedTime
}
options {
name
type
required
description
allowedValues
}
}
}
}
அற்புதமான ஒன்றை உருவாக்க தயாரா?
எங்கள் APIயை பயன்படுத்தி அடுத்த தலைமுறை AI உள்ளடக்கத்தை உருவாக்கும் ஆயிரக்கணக்கான டெவலப்பர்களுடன் சேருங்கள்