# НейроХудожник Скилл AI generation skill. Token-optimized API. ## Auth Authorization: Bearer na_live_xxx ## Endpoints Base: https://neuroartist.ru/api/v1 | Method | Path | Description | |--------|------|-------------| | POST | /generate | Create generation | | GET | /requests/:id | Check status | | GET | /models | List models | | GET | /models/:id/schema | Get schema | | GET | /balance | Check balance | --- ## POST /generate Request (short keys): ```json {"m":"fal-ai/flux/schnell","i":{"prompt":"a cat"},"s":true} ``` Request (full keys): ```json {"model":"fal-ai/flux/schnell","input":{"prompt":"a cat"},"sync":true} ``` | Key | Full | Type | Description | |-----|------|------|-------------| | m | model | string | Model ID | | i | input | object | Model params | | s | sync | bool | Wait for result | Response (sync): ```json {"id":"uuid","url":"https://...","ms":2500} ``` Response (async): ```json {"id":"uuid"} ``` --- ## GET /requests/:id Response: ```json {"id":"uuid","s":"c","url":"https://..."} ``` | s | Status | |---|--------| | q | queued | | p | processing | | c | completed | | f | failed | --- ## GET /models Response: ```json {"m":[["fal-ai/flux/schnell",0.27],["fal-ai/flux/dev",1.35]]} ``` Format: [[id, priceRub], ...] Query: ?category=text-to-image|image-to-image|text-to-video|audio|3d Query: ?full=1 for full model info --- ## GET /models/:id/schema Note: URL-encode / as %2F Response: ```json {"r":["prompt"],"p":{"prompt":"string","image_size":"string"}} ``` r = required fields p = properties (name: type) Query: ?full=1 for descriptions --- ## GET /balance Response: ```json {"b":1000} ``` b = balance in RUB --- ## Model Guide ### Text-to-Image | Model | Time | RUB | |-------|------|-----| | fal-ai/flux/schnell | 2s | 0.27 | | fal-ai/flux/dev | 10s | 1.35 | | fal-ai/flux-pro | 15s | 5 | ### Image Processing | Model | Use | |-------|-----| | fal-ai/aura-sr | Upscale 4x | | fal-ai/birefnet | Remove BG | ### Video | Model | Time | |-------|------| | fal-ai/minimax-video | 60s | | fal-ai/kling-video | 90s | --- ## Examples ### Generate image ```json {"m":"fal-ai/flux/schnell","i":{"prompt":"sunset"},"s":true} ``` ### Upscale ```json {"m":"fal-ai/aura-sr","i":{"image_url":"https://..."},"s":true} ``` ### Remove background ```json {"m":"fal-ai/birefnet","i":{"image_url":"https://..."},"s":true} ``` ### Async video ```json {"m":"fal-ai/minimax-video","i":{"prompt":"waves"}} ``` Then poll GET /requests/:id --- ## Errors | e | Meaning | |---|---------| | invalid json | Bad request body | | missing model | m field required | | missing input | i field required | | unknown model | Model not found | | not found | Request not found | | provider error | Generation failed |