Korean AI Image and Illustration Generator

다국어 입력을 활용해 한국어 텍스트를 고품질의 AI 이미지로 변환하는 자동화 워크플로우입니다. This workflow instantly translates Korean prompts and generates surreal illustrations using advanced text-to-image AI models.

 1import requests
 2import time
 3import json
 4
 5api_key = "YOUR_API_KEY"
 6url = "https://api.segmind.com/workflows/6808f1d47cbc8be62975d02c-v2"
 7
 8data = {
 9    "Prompt_in_korean": "드라마틱한 초현실주의 일러스트레이션, 1:1 비율. 밝은 주황색 배경. 거대한 오징어 모양의 촉수가 공중에서 낡은 소련 녹색 군용 밴을 맹렬하게 휘감아 밴의 몸을 짓누르고 앞 유리를 산산조각 낸다. 전술 장비를 착용한 한 병사가 촉수에 얽혀 팔다리를 뻗은 채 밴 쪽으로 끌려가고 있다. 헬멧이 날아가고 파편과 유리가 떠다닌다. 촉수는 강력한 흡착판과 촉촉한 질감을 지녔다. 조명은 강렬하고 홍보용으로 깔끔하며, 대비가 강하고, 마치 뒤틀린 액션 포스터처럼 스타일리시하다. 디테일이 살아 있고, 감정이 격렬하며, 역동적인 혼돈이 펼쳐진다."
10}
11
12def poll_for_result(poll_url):
13    """Poll the API until the generation is complete"""
14    while True:
15        response = requests.get(
16            poll_url,
17            headers={'Authorization': f'Bearer {api_key}'}
18        )
19        result = response.json()
20
21        if result['status'] == 'COMPLETED':
22            # Parse the output (it's a JSON string)
23            outputs = json.loads(result['output'])
24            return outputs
25        elif result['status'] == 'FAILED':
26            raise Exception(result.get('error', 'Generation failed'))
27
28        # Wait 7 seconds before polling again
29        time.sleep(7)
30
31# Make the initial request
32response = requests.post(
33    url,
34    json=data,
35    headers={
36        'Authorization': f'Bearer {api_key}',
37        'Content-Type': 'application/json'
38    }
39)
40
41if response.status_code == 200:
42    result = response.json()
43    print('Request queued:', result)
44
45    # Start polling for results
46    outputs = poll_for_result(result['poll_url'])
47    print('Generation complete:', outputs)
48else:
49    print(f"Error: {response.status_code}")
50    print(response.text)

API Endpoint

POSThttps://api.segmind.com/workflows/6808f1d47cbc8be62975d02c-v2

Parameters

Prompt_in_koreanoptional
string

Prompt In Korean

Default: "드라마틱한 초현실주의 일러스트레이션, 1:1 비율. 밝은 주황색 배경. 거대한 오징어 모양의 촉수가 공중에서 낡은 소련 녹색 군용 밴을 맹렬하게 휘감아 밴의 몸을 짓누르고 앞 유리를 산산조각 낸다. 전술 장비를 착용한 한 병사가 촉수에 얽혀 팔다리를 뻗은 채 밴 쪽으로 끌려가고 있다. 헬멧이 날아가고 파편과 유리가 떠다닌다. 촉수는 강력한 흡착판과 촉촉한 질감을 지녔다. 조명은 강렬하고 홍보용으로 깔끔하며, 대비가 강하고, 마치 뒤틀린 액션 포스터처럼 스타일리시하다. 디테일이 살아 있고, 감정이 격렬하며, 역동적인 혼돈이 펼쳐진다."

Response Format

Returns: Polling-based asynchronous response

Initial request returns a poll_url. Poll every 7 seconds until status is COMPLETED.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Workflow not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out