chatgpt-api/docs/tools/midjourney.mdx

39 wiersze
800 B
Plaintext
Czysty Zwykły widok Historia

2024-08-07 02:19:51 +00:00
---
title: Midjourney
description: Unofficial Midjourney API client for generative images.
---
- package: `@agentic/midjourney`
- exports: `class MidjourneyClient`, `namespace midjourney`
- env vars: `MIDJOURNEY_IMAGINE_API_KEY`
- [source](https://github.com/transitive-bullshit/agentic/blob/main/packages/midjourney/src/midjourney-client.ts)
2024-08-17 11:03:17 +00:00
- [imagine api docs](https://www.imagineapi.dev)
2024-08-07 02:19:51 +00:00
## Install
<CodeGroup>
```bash npm
npm install @agentic/midjourney
```
```bash yarn
yarn add @agentic/midjourney
```
```bash pnpm
pnpm add @agentic/midjourney
```
</CodeGroup>
## Usage
```ts
import { MidjourneyClient } from '@agentic/midjourney'
const midjourney = new MidjourneyClient()
const res = await midjourney.imagine({
prompt: 'beautiful sunset over the ocean, oil painting, monet'
})
```