Views
No views yet

API_KEY from imagepipeline.io. No payment required.php javascript node etc ? Checkout our documentation1import requests
2import json
3
4url = "https://imagepipeline.io/sdxl/text2image/v1/run"
5
6payload = json.dumps({
7"model_id": "8e49cb01-55cd-40ff-8fe5-6b81eefe6bd6",
8"prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K",
9"negative_prompt": "painting, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, deformed, ugly, blurry, bad anatomy, bad proportions, extra limbs, cloned face, skinny, glitchy, double torso, extra arms, extra hands, mangled fingers, missing lips, ugly face, distorted face, extra legs, anime",
10"width": "512",
11"height": "512",
12"samples": "1",
13"num_inference_steps": "30",
14"safety_checker": false,
15"guidance_scale": 7.5,
16"multi_lingual": "no",
17"embeddings": "",
18"lora_models": "",
19"lora_weights": ""
20})
21
22headers = {
23'Content-Type': 'application/json',
24'API-Key': 'your_api_key'
25}
26
27response = requests.request("POST", url, headers=headers, data=payload)
28
29print(response.text)
30
31}MODELS like this for SD 1.5 and SDXL : https://api.imagepipeline.io/sdxl/text2image/v1| Headers | Type | Description |
|---|---|---|
API-Key | str | Get your API_KEY from imagepipeline.io |
Content-Type | str | application/json - content type of the request body |
| Parameter | Type | Description |
|---|---|---|
model_id | str | Your base model, find available lists in models page or upload your own |
prompt | str | Text Prompt. Check our Prompt Guide for tips |
num_inference_steps | int [1-50] | Noise is removed with each step, resulting in a higher-quality image over time. Ideal value 30-50 (without LCM) |
guidance_scale | float [1-20] | Higher guidance scale prioritizes text prompt relevance but sacrifices image quality. Ideal value 7.5-12.5 |
lora_models | str, array | Pass the model_id(s) of LoRA models that can be found in models page |
lora_weights | str, array | Strength of the LoRA effect |