SeedEdit 3.0 i2i
SeedEdit 3.0 enables seamless, high-quality image edits through advanced AI-driven techniques.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/seededit-v3"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Replace the background with a sunny beach scene, keep lighting consistent.",
12 "image_url": "https://segmind-resources.s3.amazonaws.com/input/310c635e-98ec-413e-90bd-a3958c0f94ce-03e6053a-24ed-4466-84b7-a0878e211fc0.jpeg",
13 "size": "adaptive",
14 "seed": 42,
15 "guidance_scale": 5.5
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/seededit-v3"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Replace the background with a sunny beach scene, keep lighting consistent.",
12 "image_url": "https://segmind-resources.s3.amazonaws.com/input/310c635e-98ec-413e-90bd-a3958c0f94ce-03e6053a-24ed-4466-84b7-a0878e211fc0.jpeg",
13 "size": "adaptive",
14 "seed": 42,
15 "guidance_scale": 5.5
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text)API Endpoint
https://api.segmind.com/v1/seededit-v3Parameters
image_urlrequiredstring (uri)URL of the image to be edited. Use a clear source like S3 for best results.
promptrequiredstringDescribe the change you want in the image. For playful edits, try 'Make the bubbles cat-shaped'.
guidance_scaleoptionalnumberProvides control over prompt adherence. Use a higher value, like 9, for strict guidance.
5.5Range: 1 - 10seedoptionalintegerSeed ensures consistent outputs. Use 42 for experiments or 1987 for varied results.
42Range: 1 - 999999sizeoptionalstringSpecifies output size behavior. Choose 'square' for social media or 'original' for no cropping.
"adaptive""adaptive""original""square"Response Type
Returns: Image
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out