143 lines
4.3 KiB
ReStructuredText
143 lines
4.3 KiB
ReStructuredText
@base = http://localhost:3000
|
||
@apiKey = bnt_71e7e16732ac5e21f597edc56e99e8c3696e713552ec9d1f44dfeffb2ef7c495
|
||
|
||
###############################################################################
|
||
# IMAGE REFERENCES & ALIASES TESTING
|
||
# This file demonstrates the complete flow of:
|
||
# 1. Generating an image with an alias
|
||
# 2. Verifying the alias is assigned
|
||
# 3. Using that alias as a reference in another generation
|
||
###############################################################################
|
||
|
||
|
||
###############################################################################
|
||
# STEP 1: Generate Simple Logo (1:1 aspect ratio)
|
||
###############################################################################
|
||
|
||
# @name generateLogo
|
||
POST {{base}}/api/v1/generations
|
||
Content-Type: application/json
|
||
X-API-Key: {{apiKey}}
|
||
|
||
{
|
||
"prompt": "A sleek and modern company logo featuring a stylized character @ turning it into a snail in blue and brown colors, minimalist design, vector art",
|
||
"aspectRatio": "1:1",
|
||
"assignAlias": "@logo-snail",
|
||
"autoEnhance": false
|
||
}
|
||
|
||
###
|
||
|
||
@logoGenerationId = {{generateLogo.response.body.$.data.id}}
|
||
@logoImageId = {{generateLogo.response.body.$.data.outputImageId}}
|
||
|
||
|
||
###############################################################################
|
||
# STEP 2: Verify Logo Alias Assignment
|
||
###############################################################################
|
||
|
||
### Resolve @logo Alias
|
||
# Confirm that @logo alias is properly assigned and retrieve image metadata
|
||
GET {{base}}/api/v1/images/resolve/@logo-snail
|
||
X-API-Key: {{apiKey}}
|
||
|
||
###
|
||
|
||
### Get Logo Generation Details
|
||
# View complete generation record with output image
|
||
GET {{base}}/api/v1/generations/{{logoGenerationId}}
|
||
X-API-Key: {{apiKey}}
|
||
|
||
###
|
||
|
||
### Get Logo Image Details
|
||
# View image record directly by ID
|
||
GET {{base}}/api/v1/images/{{logoImageId}}
|
||
X-API-Key: {{apiKey}}
|
||
|
||
|
||
###############################################################################
|
||
# STEP 3: Generate Lorry with Logo Reference
|
||
###############################################################################
|
||
|
||
# @name generateLorry
|
||
POST {{base}}/api/v1/generations
|
||
Content-Type: application/json
|
||
X-API-Key: {{apiKey}}
|
||
|
||
{
|
||
"prompt": "A modern lorry truck driving on a winding mountain road during sunset, the truck has a large @logo-snail prominently displayed on its side panel, photorealistic style, golden hour lighting, detailed commercial vehicle, scenic mountain landscape",
|
||
"aspectRatio": "16:9",
|
||
"referenceImages": ["@logo-snail"],
|
||
"assignAlias": "@lorry",
|
||
"autoEnhance": false
|
||
}
|
||
|
||
###
|
||
|
||
@lorryGenerationId = {{generateLorry.response.body.$.data.id}}
|
||
@lorryImageId = {{generateLorry.response.body.$.data.outputImageId}}
|
||
|
||
### new
|
||
POST {{base}}/api/v1/generations
|
||
Content-Type: application/json
|
||
X-API-Key: {{apiKey}}
|
||
|
||
{
|
||
"prompt": "Грузовик @lorry стоит на разгрузке в аэропорту рядом с огромным грузовым самолетом на фоне гор",
|
||
"aspectRatio": "16:9",
|
||
"referenceImages": ["@lorry"],
|
||
"assignAlias": "@airplane",
|
||
"autoEnhance": false
|
||
}
|
||
|
||
###
|
||
|
||
|
||
###############################################################################
|
||
# VERIFICATION: Check Both Generations
|
||
###############################################################################
|
||
|
||
### List All Generations
|
||
# View both logo and lorry generations in the project
|
||
GET {{base}}/api/v1/generations?limit=10&offset=0
|
||
X-API-Key: {{apiKey}}
|
||
|
||
###
|
||
|
||
### Resolve @lorry-branded Alias
|
||
# Confirm the lorry image alias is assigned
|
||
GET {{base}}/api/v1/images/resolve/@lorry
|
||
X-API-Key: {{apiKey}}
|
||
|
||
###
|
||
|
||
### Get Lorry Generation Details
|
||
# View complete generation with reference images
|
||
GET {{base}}/api/v1/generations/{{lorryGenerationId}}
|
||
X-API-Key: {{apiKey}}
|
||
|
||
###
|
||
|
||
### List All Images
|
||
# View both logo and lorry images
|
||
GET {{base}}/api/v1/images?limit=10&offset=0
|
||
X-API-Key: {{apiKey}}
|
||
|
||
|
||
###############################################################################
|
||
# BONUS: Test Technical Aliases
|
||
###############################################################################
|
||
|
||
### Resolve @last (Most Recent Image)
|
||
# Should return the lorry image (most recently generated)
|
||
GET {{base}}/api/v1/images/resolve/@last
|
||
X-API-Key: {{apiKey}}
|
||
|
||
###
|
||
|
||
### Resolve @first (First Generated Image)
|
||
# Should return the logo image (first generated in this flow)
|
||
GET {{base}}/api/v1/images/resolve/@first
|
||
X-API-Key: {{apiKey}}
|