APIMODELSAPIMODELS
Документация API

apimodels.app

Docs/SparkPix API

SparkPix API

SparkPix's ultra-fast image models with two separate endpoints. SparkPix Image generates text-to-image in under 1 second with LoRA custom style support. SparkPix Image Edit supports multi-image reference editing. Both are synchronous APIs returning results directly.

Authentication

Authorization: Bearer YOUR_API_KEY

Models & pricing

ModelEndpointPriceNotes
SparkPix ImagePOST /api/v1/images/generations-sync$0.0080/imageText-to-image, sync, <1s, LoRA support
SparkPix Image EditPOST /api/v1/images/edit$0.0130/imageMulti-image editing, sync, <1s

Code examples

# SparkPix Image: Text-to-image (sync, sub-1-second)
curl -X POST https://api.apimodels.app/v1/images/generations-sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cute cat wearing a space helmet, digital art",
    "aspect_ratio": "16:9",
    "seed": 42
  }'

# SparkPix Image Edit: Multi-image editing (sync)
curl -X POST https://api.apimodels.app/v1/images/edit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Make the background a sunset beach",
    "images": ["https://example.com/photo.jpg"],
    "aspect_ratio": "16:9"
  }'

SparkPix Image — Request parameters

POST /api/v1/images/generations-sync
FieldRequiredTypeDescription
promptYesstringText description for image generation
aspect_ratioNostring"custom" (default, auto size), "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"
widthNointegerOnly when aspect_ratio="custom", 256-1440, must be multiple of 16
heightNointegerOnly when aspect_ratio="custom", 256-1440, must be multiple of 16
prompt_upsamplingNobooleanAuto-enhance prompt with LLM (default: false)
seedNointegerRandom seed for reproducibility
lora_weightsNostringHuggingFace LoRA weights URL, format: huggingface.co/<owner>/<model>[/<file.safetensors>]
lora_scaleNonumberLoRA strength, -1 to 3, default 0.5
callBackUrlNostringWebhook URL called when task completes

SparkPix Image Edit — Request parameters

POST /api/v1/images/edit
FieldRequiredTypeDescription
promptYesstringEditing instructions. Refer to inputs as "image 1", "image 2", etc.
imagesNostring[]Reference image URL array, first image is the primary one
aspect_ratioNostring"match_input_image" (default, match first image), "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"
turboNobooleanTurbo mode (default: true), recommended off for complex tasks
seedNointegerRandom seed for reproducibility
callBackUrlNostringWebhook URL called when task completes

Notes

  • The two models use different API endpoints
  • Both are synchronous APIs returning image URLs directly, no polling needed
  • Response format: { code: 200, data: { url, model, credits, duration } }
  • SparkPix Image aspect_ratio defaults to "custom" (auto), SparkPix Image Edit defaults to "match_input_image"

Try it in the Playground

FAQ

How fast is SparkPix?

SparkPix Image generates text-to-image in under 1 second and both endpoints are synchronous — the image URL comes back in the same response, no polling.

Which endpoint do I use for editing vs generation?

Text-to-image: POST /api/v1/images/generations-sync. Editing: POST /api/v1/images/edit with images[] (first image is the primary). They are separate endpoints.