Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff0960d

Browse files
committed
feat: 修复 Luma 更新 cookie 鉴权
1 parent 446c94c commit ff0960d

16 files changed

+852
-233
lines changed

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,25 @@ I provide the Luma AI API, no deployment is required, no subscription to Luma is
1818
- [x] Provides standardized services compatible with OpenAI's interface format, supporting both streaming and non-streaming output.
1919
- [x] Supports customization of the OpenAI Chat response format based on Go Template syntax.
2020
- [x] Compatible with frontend projects like chat-next-web.
21-
- [] Automatic keep-alive (still lacking access to refresh token interface).
21+
- [x] Automatic keep-alive (max keep-alive 7 days).
2222
- [] Adapts to intermediary projects like New API.
2323
- [] Pre-detection of sensitive words.
2424

25+
## Supported Endpoints
26+
Video generation, supports uploading two images (start and end).
27+
[x] /generations
28+
Video extension, extends by 5 seconds each time.
29+
[x] /generations/:task_id/extend
30+
Query single video task.
31+
[x] /generations/:task_id
32+
Pre-upload images.
33+
[x] /generations/file_upload
34+
Get download URL without watermark.
35+
[x] /generations/:task_id/download_video_url
36+
Get account subscription information (balance, etc.).
37+
[x] /subscription/usage
38+
Get account information.
39+
[x] /users/me
2540

2641
## Web UI
2742
https://github.com/Dooy/chatgpt-web-midjourney-proxy
@@ -62,16 +77,14 @@ curl --location 'http://localhost:8000/luma/generations/' \
6277

6378
### Configuration
6479
Log in using Google Chrome https://lumalabs.ai/dream-machine/
65-
Get access_token
66-
67-
![token.png](./docs/images/token.png)
80+
Get cookie
81+
![cookie](./docs/images/cookie.jpg)
6882

6983

7084
### Env Environment Variables
7185
| env | description | default value |
7286
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|
73-
| COOKIE | Cookie obtained from the image above for the Luma account,having either the access_token or the cookie is sufficient. | None |
74-
| ACCESS_TOKEN | The access_token and cookie obtained from the luma account in the image above; having either the access_token or the cookie is sufficient. | None |
87+
| COOKIE | Cookie obtained from the image above for the Luma account | None |
7588
| BASE_URL | Request API URL for Luma | https://internal-api.virginia.labs.lumalabs.ai |
7689
| PROXY | HTTP proxy | None |
7790
| PORT | Port | 8000 |
@@ -112,7 +125,7 @@ services:
112125
volumes:
113126
- ./logs:/logs
114127
environment:
115-
- ACCESS_TOKEN=
128+
- COOKIE=xxxx
116129
```
117130

118131
### Local Deployment

README_ZH.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,28 @@
1717
- [x] 提供符合 OpenAI 格式的接口标准化服务,支持流式、非流输出内容
1818
- [x] 支持自定义 OpenAI Chat 返回内容格式,基于 Go Template 语法
1919
- [x] 适配 chat-next-web 等前端项目
20-
- [] 自动保活(还未抓取到 refresh token 接口
20+
- [x] 自动保活(最多7天
2121
- [] 适配 New API 等中转项目
2222
- [] 敏感词预检测
2323

24+
## 支持接口
25+
- 视频生成,支持上传首尾两张图片
26+
- [x] /generations
27+
- 视频延长,每次延长5秒
28+
- [x] /generations/:task_id/extend
29+
- 查询单视频任务
30+
- [x] /generations/:task_id
31+
- 预上传图片
32+
- [x] /generations/file_upload
33+
- 获取无水印下载地址
34+
- [x] /generations/:task_id/download_video_url
35+
- 获取账号订阅信息(余额等)
36+
- [x] /subscription/usage
37+
- 获取账号信息
38+
- [x] /users/me
39+
40+
41+
2442
## 对应界面
2543
https://github.com/Dooy/chatgpt-web-midjourney-proxy
2644
在线体验:
@@ -64,15 +82,11 @@ curl --location 'http://localhost:8000/luma/generations/' \
6482
1. 从浏览器中获取 cookie
6583
![cookie](./docs/images/cookie.jpg)
6684

67-
2. 从浏览器中获取 access_token
68-
![token.png](./docs/images/token.png)
69-
7085
### Env Environment Variables
7186
| 环境变量 | 说明 | 默认值 |
7287
| --- |----------------------------------------------------------|----------------------------|
73-
| COOKIE | 上图获取的 luma 账号的 cookie, cookie 和 access_token 有其一就行 ||
74-
| ACCESS_TOKEN | 上图获取的 luma 账号的 access_token, cookie 和 access_token 有其一就行 ||
75-
| BASE_URL | Luma 官方请求 API URL<br/> | https://internal-api.virginia.labs.lumalabs.ai |
88+
| COOKIE | 上图获取的 luma 账号的 cookie ||
89+
| BASE_URL | Luma 官方请求 API URL | https://internal-api.virginia.labs.lumalabs.ai |
7690
| PROXY | Http 代理 ||
7791
| PORT | 开放端口 | 8000 |
7892
| SECRET_TOKEN | Luma API 接口安全 Header Bearer token,强烈希望配置 ||
@@ -111,7 +125,7 @@ services:
111125
volumes:
112126
- ./logs:/logs
113127
environment:
114-
- ACCESS_TOKEN=
128+
- COOKIE=xxxx
115129
```
116130

117131
### Local Deployment

0 commit comments

Comments
 (0)