{"_id":"@aiapi/midjourney-omg","name":"@aiapi/midjourney-omg","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@aiapi/midjourney-omg","version":"0.0.1","description":"⚙ A simple api for midjourney (ohmygpt)","main":"dist/index.common.js","module":"dist/index.esm.js","scripts":{"test":"jest --coverage","lint":"eslint ./src --ext .js,.ts --fix","build":"rm -rf ./dist && rollup -c rollup.config.js","build:docs":"typedoc","build:watch":"rollup -c rollup.config.js -w"},"types":"index.d.ts","keywords":["aiapi","midjourney","ohmygpt","llm-sdk"],"author":{"name":"Souler Ou","url":"ou@souler.cc"},"license":"MIT","dependencies":{"core-js":"^3.8.0"},"devDependencies":{"@babel/core":"^7.12.9","@babel/preset-env":"^7.12.7","@commitlint/cli":"9.1.2","@commitlint/config-conventional":"9.1.2","@rollup/plugin-babel":"^5.1.0","@rollup/plugin-commonjs":"^11.0.0","@rollup/plugin-node-resolve":"^10.0.0","@rollup/plugin-replace":"^2.3.3","@rollup/plugin-typescript":"^2.0.0","@types/jest":"^26.0.15","@types/node":"^14.14.10","@types/semver":"6.2.2","@typescript-eslint/eslint-plugin":"^3.10.1","@typescript-eslint/parser":"^3.10.1","commitizen":"4.2.1","cz-customizable":"5.2.0","eslint":"^6.7.2","eslint-plugin-prettier":"^3.1.1","jest":"^26.6.3","prettier":"^1.19.1","rollup":"^2.23.0","rollup-plugin-dts":"^2.0.1","ts-jest":"26.4.1","ts-loader":"^8.0.3","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typedoc-plugin-markdown":"3.5.0","typescript":"^4.3.0"},"config":{"commitizen":{"path":"./node_modules/cz-customizable"},"cz-customizable":{"config":".cz-configrc.js"}},"gitHead":"bb7ca089fcab40108b0b46aff8d5ca5597e68703","_id":"@aiapi/midjourney-omg@0.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-Z8JF/mZMGqRCvxbHGhyT8pY5GgFzLaTdP3nYNxX66Wo0k+3gkB3sStsDMoNJoWvyP+nWwHuYfSp1XRX5cNN2tw==","shasum":"ff83949cbe7ea3eaa144e68dbfa794735439b3b2","tarball":"https://registry.npmjs.org/@aiapi/midjourney-omg/-/midjourney-omg-0.0.1.tgz","fileCount":5,"unpackedSize":44092,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH0FTiLbQV1mKnXJEAckihWDtzcQp4/c9OVPj3siVlMcCIQCqbPiLpo+EJyU3Kt0giEczpP/nxXjajK6u0WYC/4QOPw=="}]},"_npmUser":{"name":"soulerou","email":"ou@souler.cc"},"directories":{},"maintainers":[{"name":"soulerou","email":"ou@souler.cc"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/midjourney-omg_0.0.1_1697111236439_0.05285411093114978"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-12T11:47:16.337Z","0.0.1":"2023-10-12T11:47:16.610Z","modified":"2023-10-12T11:47:16.958Z"},"maintainers":[{"name":"soulerou","email":"ou@souler.cc"}],"description":"⚙ A simple api for midjourney (ohmygpt)","keywords":["aiapi","midjourney","ohmygpt","llm-sdk"],"author":{"name":"Souler Ou","url":"ou@souler.cc"},"license":"MIT","readme":"# AIAPI - Midjourney client (OhMyGPT Provide)\n\nThis documentation provides an overview of the OMG Midjourney service and its available functions. The OMG Midjourney service offers various functionalities for generating and operating on Midjourney images.\n\n\n## Why aiapi?\naiapi provide the minimum implementation for the LLM/App api, you can easily use it at no much efforts. It's especially suitable for anyone to test / run an ai-based app prototype.\n\n\n## Installation\n```shell\n# installation via npm\nnpm install @aiapi/midjourney-omg --save\n\n# installation via yarn\nyarn add @aiapi/midjourney-omg --save\n\n# installation via pnpm\npnpm install @aiapi/midjourney-omg --save\n```\n\n\n## API Usage\n- [OMG Midjourney Generation Invocation](#omg-midjourney-generation-invocation)\n- [OMG Midjourney Operation Invocation](#omg-midjourney-operation-invocation)\n- use MidjourneyService directly\n\n\n## OMG Midjourney Generation Invocation\n\nCalls the OMG's Midjourney service to generate a Midjourney image based on the given prompt and appKey.\n\n### Usage\n\n```typescript\nimport { simpleCreateMidjourneyImage, OmgMidjourneyCreateParam } from '@aiapi/midjourney-omg'\n\nconst params: OmgMidjourneyCreateParam = {\n    prompt: 'Your prompt here',\n    mirrorType: 'base', // optional values: 'base' | 'mirror_1' | 'mirror_2' | 'mirror_3'\n    key: 'Your API key',\n    generateType: 'NORMAL', // optional, default: 'NORMAL'\n    progresser: (progress: any) => console.log(progress) // optional\n}\n\nconst response: Promise<MidjourneySubmitData> = simpleCreateMidjourneyImage(params);\n```\n\n### Parameters\n\n- `params` (OmgMidjourneyCreateParam): An object containing the following parameters:\n  - `prompt` (string): The prompt for generating the Midjourney image.\n  - `mirrorType` (string, optional): Image source address, optional values: 'base' | 'mirror_1' | 'mirror_2' | 'mirror_3'.\n  - `key` (string): The API key for authentication.\n  - `generateType` ('FAST' | 'NORMAL', optional): The generation mode, default is 'NORMAL'.\n  - `progresser` ((progress: any) => any, optional): A progress callback function to receive progress updates.\n\n### Returns\n\n- `response` (Promise<MidjourneySubmitData>): A promise that resolves to the generated Midjourney image data.\n\n## OMG Midjourney Operation Invocation\n\nCalls the OMG's Midjourney service to perform an operation on a Midjourney image based on the given parameters.\n\n### Usage\n\n```typescript\nimport { operateMidjourneyImage, OmgMidjourneyOperateParam } from '@aiapi/midjourney-omg'\n\nconst params: OmgMidjourneyOperateParam = {\n    actionId: 'Your action ID',\n    taskId: 'Your task ID',\n    mirrorType: 'base', // optional values: 'base' | 'mirror_1' | 'mirror_2' | 'mirror_3'\n    key: 'Your API key',\n    generateType: 'NORMAL', // optional, default: 'NORMAL'\n    progresser: (progress: any) => console.log(progress) // optional\n}\n\nconst response: Promise<MidjourneySubmitData> = operateMidjourneyImage(params);\n```\n\n### Parameters\n\n- `params` (OmgMidjourneyOperateParam): An object containing the following parameters:\n  - `actionId` (string): The ID of the action to be performed on the Midjourney image.\n  - `taskId` (string): The ID of the previous task condition.\n  - `mirrorType` (string, optional): Image source address, optional values: 'base' | 'mirror_1' | 'mirror_2' | 'mirror_3'.\n  - `key` (string): The API key for authentication.\n  - `generateType` ('FAST' | 'NORMAL', optional): The generation mode, default is 'NORMAL'.\n  - `progresser` ((progress: any) => any, optional): A progress callback function to receive progress updates.\n\n### Returns\n\n- `response` (Promise<MidjourneySubmitData>): A promise that resolves to the modified Midjourney image data.\n","readmeFilename":"README.md"}