@legnext-api/js-sdk
v1.0.2
Published
OpenAPI client for @legnext/midjourney-sdk
Maintainers
Readme
@legnext-api/[email protected]
This generator creates TypeScript/JavaScript client that utilizes axios. The generated Node module can be used in the following environments:
Environment
- Node.js
- Webpack
- Browserify
Language level
- ES5 - you must have a Promises/A+ library installed
- ES6
Module system
- CommonJS
- ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via package.json. (Reference)
Building
To build and compile the typescript sources to javascript use:
npm install
npm run buildPublishing
First build the package then run npm publish
Consuming
navigate to the folder of your consuming project and run one of the following commands.
published:
npm install @legnext-api/[email protected] --saveunPublished (not recommended):
npm install PATH_TO_GENERATED_PACKAGE --saveDocumentation for API Endpoints
All URIs are relative to https://api.legnext.ai/api
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AccountApi | getAccountBalance | GET /account/balance | Get Account Balance ImageGenerationApi | blendImages | POST /v1/blend | Blend Images ImageGenerationApi | createVariation | POST /v1/variation | Create Image Variation ImageGenerationApi | describeImage | POST /v1/describe | Describe Image ImageGenerationApi | editImage | POST /v1/edit | Edit Image ImageGenerationApi | enhanceImage | POST /v1/enhance | Enhance ImageGenerationApi | generateImage | POST /v1/diffusion | Text to Image ImageGenerationApi | inpaint | POST /v1/inpaint | Inpaint ImageGenerationApi | outpaint | POST /v1/outpaint | Outpaint ImageGenerationApi | panExtend | POST /v1/pan | Pan Extend ImageGenerationApi | remixImage | POST /v1/remix | Remix ImageGenerationApi | removeBackground | POST /v1/remove-background | Remove Background ImageGenerationApi | rerollTask | POST /v1/reroll | Reroll Task ImageGenerationApi | retexture | POST /v1/retexture | Retexture ImageGenerationApi | shortenPrompt | POST /v1/shorten | Shorten Prompt ImageGenerationApi | uploadPaint | POST /v1/upload-paint | Advanced Edit with Canvas ImageGenerationApi | upscaleImage | POST /v1/upscale | Upscale Image TaskManagementApi | getTaskStatus | GET /v1/job/{job_id} | Get Task Status VideoGenerationApi | extendVideo | POST /v1/extend-video | Extend Video VideoGenerationApi | generateVideo | POST /v1/video-diffusion | Video Diffusion VideoGenerationApi | upscaleVideo | POST /v1/video-upscale | Video Upscale
Documentation For Models
- AccountInfo
- AccountInfoQuota
- ActiveTask
- ActiveTasksResponse
- BalanceResponse
- BalanceResponseData
- BlendRequest
- Config
- DescribeRequest
- DiffusionRequest
- EditRequest
- EditRequestCanvas
- EditRequestImgPos
- EnhanceRequest
- ErrorResponse
- ExtendVideoRequest
- ImageOutput
- InpaintRequest
- InpaintRequestMask
- InpaintRequestMaskAreasInner
- JobStatus
- Meta
- MetaUsage
- ModelError
- OutpaintRequest
- PanRequest
- RemixRequest
- RemoveBackgroundRequest
- RerollRequest
- RetextureRequest
- ShortenRequest
- TaskResponse
- TaskType
- UploadPaintRequestMask
- UpscaleRequest
- VariationRequest
- VideoDiffusionRequest
- VideoUpscaleRequest
- WebhookConfig
Documentation For Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header
