Skip to content

Let's use AI to Earn!

delete test

bulaienaofutuojiesenzhang0b8a5c6ed29e
diff --git a/src/app/[lng]/aaa.md b/src/app/[lng]/aaa.md
deleted file mode 100644
index 8252dc3b..00000000
--- a/src/app/[lng]/aaa.md
+++ /dev/null
@@ -1,64 +0,0 @@
-
-gpt-5 大模型 大模型价格以官方价格为准 每百万tokens
-* 输入 9元
-* 输出 72元 yun
-gpt-5-mini 大模型 * 输入 1.8元
-* 输出 14.4元 yun
-gpt-5-nano 大模型 * 输入 0.36元
-* 输出 2.88元 yun
-gemini-2.5-pro 大模型 支持视频 * 输入9元
-* 输出 72元 yun
-chatgpt-4o-latest 大模型 * 输入 36元
-* 输出 108元 yun
-gemini-2.5-flash 大模型 支持视频 * 输入 2.16元
-* 输出 18元 yun
-qwen-vl-max-latest 大模型 * 输入1.6元
-* 输出4元 yun
-暂不接入
-kimi-k2-0711-preview 大模型 不支持图片 暂不接入
-grok-4 大模型 不支持图片 暂不接入
-claude-opus-4-1-20250805-thinking 大模型 不支持图片,不支持图片的不着急支持 暂不接入
-qwen3-235b-a22b-07-25 大模型 不支持图片 暂不接入
-deepseek-r1-0528 大模型 不支持图片 暂不接入
-claude-sonnet-4-20250514-thinking 大模型 不支持图片 暂不接入
-deepseek-v3-0324 大模型 不支持图片 暂不接入
-gemini-2.5-flash-image 图片生成 又名nano banana
-支持多图像输入
-https://ai.google.dev/gemini-api/docs/image-generation#limitations 促销 1积分 0.27元 yun
-seedream-3.0 图片生成 2.6积分 0.26元 官方
-seededit-3.0 图片生成 图片编辑,传入图片需要满足以下条件:
-图片格式:jpeg、png。
-宽高比(宽/高):在范围 (1/3, 3) 。
-宽高长度(px) > 14。
-大小:不超过 10MB。 3积分 0.3元 官方
-gpt-image-1 图片生成 支持图片编辑 促销 1积分 * low $0.011-0.016
-* medium $0.042-0.063
-* high $ 0.167-0.25 yun
-FLUX.1 Kontext [max] 图片生成 支持图片编辑 促销 1.5积分 0.6元 yun
-FLUX.1 Kontext [pro] 图片生成 支持图片编辑 促销 1积分 0.3元 yun
-FLUX.1[dev] 图片生成 先不上 0.2元
-Flux 1.1 pro ultra 图片生成 4.5积分 0.45元 官方
-Flux1.1 pro 图片生成 3积分 0.3元 官方
-midjourney relax 视频生成 5秒 促销 免费 yun
-midjourney fast/turbo 视频生成 5秒 促销 4积分 yun
-kling1.5/1.6/2.1 视频生成 5秒 720p 20积分 2元 yun 官方
-kling1.5/1.6/2.1 视频生成 10秒 720p 40积分 4元 yun
-kling1.5/1.6/2.1 视频生成 5秒 1080p 35积分 3.5元 yun
-kling1.5/1.6/2.1 视频生成 10秒 1080p 70积分 7元 yun
-kling1.6多图参考 视频生成 5秒 720p 20积分 2元 yun
-kling1.6多图参考 视频生成 10秒 720p 40积分 4元 yun
-kling1.6多图参考 视频生成 5秒 1080p 35积分 3.5元 yun
-kling1.6多图参考 视频生成 10秒 1080p 70积分 7元 yun
-kling2.1大师 视频生成 5秒 1080p 100积分 10元 yun
-kling2.1大师 视频生成 10秒 1080p 200积分 20元 yun kling2.1大师
-wan2.2-plus 视频生成 5秒 480p 70积分 0.7元 yun
- 视频生成 5秒 1080p 35积分 3.5元 yun wan2.2-plus
-wan2.1-turbo(14b) 视频生成 5秒 720p 不要使用火山渠道 12积分 1.2元 yun
-wan2.1-plus 视频生成 5秒 720p 支持首尾帧 35积分 3.5元 yun wan2.1-turbo(14b)
-wanx2.1-vace-plus 视频生成 5秒 720p 视频编辑 35积分 3.5元 yun wan2.1-turbo(14b)
-seedance-1.0-pro 视频生成 5秒 480p 支持10秒 7.2积分 0.72元 yun
- 视频生成 5秒 720p 10秒价格翻倍就行 16.4积分 1.64元 yun seedance-1.0-pro
- 视频生成 5秒 1080p 36.7积分 3.67元 yun seedance-1.0-pro
-seedance-1.0-lite 视频生成 5秒 480p 支持首尾帧 5积分 0.5元 yun
- 视频生成 5秒 720p 支持10秒 11积分 1.1元 seedance-1.0-lite
- 视频生成 5秒 1080p 10秒价格翻倍 25积分 2.5元
\ No newline at end of file
diff --git a/src/app/[lng]/material/ai-generate/page.tsx b/src/app/[lng]/material/ai-generate/page.tsx
index c8b4d2d4..3dee7d3a 100644
--- a/src/app/[lng]/material/ai-generate/page.tsx
+++ b/src/app/[lng]/material/ai-generate/page.tsx
@@ -215,37 +215,39 @@ export default function AIGeneratePage() {
// 'doubao-seedream-3-0-t2i-250415': 2.6
// };
- // 视频模型积分消耗映射 - 按模型、时长、分辨率组合
- const videoModelCreditCosts: Record<string, Record<number, Record<string, number>>> = {
- 'doubao-seedance-1-0-pro-250528': {
- 5: { '480p': 7.2, '720p': 16.4, '1080p': 36.7 },
- 10: { '480p': 14.4, '720p': 32.8, '1080p': 73.4 }
- },
- 'doubao-seedance-1-0-lite-i2v-250428': {
- 5: { '480p': 5, '720p': 11, '1080p': 25 },
- 10: { '480p': 10, '720p': 22, '1080p': 45 }
- },
- 'doubao-seedance-1-0-lite-t2v-250428': {
- 5: { '480p': 5, '720p': 11, '1080p': 25 },
- 10: { '480p': 10, '720p': 22, '1080p': 45 }
- },
- 'wan2-1-14b-i2v-250225': {
- 5: { '480p': 12, '720p': 12, '1080p': 36 },
- },
- 'wan2-1-14b-t2v-250225': {
- 5: { '480p': 12, '720p': 12, '1080p': 36 },
- }
- };
+ // 视频模型积分消耗映射 - 现在从接口获取,不再写死
+ // const videoModelCreditCosts: Record<string, Record<number, Record<string, number>>> = {
+ // 'doubao-seedance-1-0-pro-250528': {
+ // 5: { '480p': 7.2, '720p': 16.4, '1080p': 36.7 },
+ // 10: { '480p': 14.4, '720p': 32.8, '1080p': 73.4 }
+ // },
+ // 'doubao-seedance-1-0-lite-i2v-250428': {
+ // 5: { '480p': 5, '720p': 11, '1080p': 25 },
+ // 10: { '480p': 10, '720p': 22, '1080p': 45 }
+ // },
+ // 'doubao-seedance-1-0-lite-t2v-250428': {
+ // 5: { '480p': 5, '720p': 11, '1080p': 25 },
+ // 10: { '480p': 10, '720p': 22, '1080p': 45 }
+ // },
+ // 'wan2-1-14b-i2v-250225': {
+ // 5: { '480p': 12, '720p': 12, '1080p': 36 },
+ // },
+ // 'wan2-1-14b-t2v-250225': {
+ // 5: { '480p': 12, '720p': 12, '1080p': 36 },
+ // }
+ // };
- // 获取视频模型积分消耗
+ // 获取视频模型积分消耗 - 现在从接口数据获取
const getVideoModelCreditCost = (modelName: string, duration: number, size: string): number => {
- const modelCosts = videoModelCreditCosts[modelName];
- if (!modelCosts) return 0;
+ const model = videoModels.find(m => m.name === modelName);
+ if (!model || !model.pricing || !Array.isArray(model.pricing)) return 0;
- const durationCosts = modelCosts[duration];
- if (!durationCosts) return 0;
+ // 在 pricing 数组中查找匹配的 duration 和 resolution
+ const pricingItem = model.pricing.find((item: any) =>
+ item.duration === duration && item.resolution === size
+ );
- return durationCosts[size] || 0;
+ return pricingItem ? pricingItem.price : 0;
};
// 根据模式过滤视频模型列表
diff --git a/src/app/[lng]/material/ai-generate/price-integration.test.ts b/src/app/[lng]/material/ai-generate/price-integration.test.ts
deleted file mode 100644
index 29dc2c94..00000000
--- a/src/app/[lng]/material/ai-generate/price-integration.test.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-// 测试文生图价格集成
-describe('AI Generate Price Integration', () => {
- it('should use pricing from API response instead of hardcoded values', () => {
- // 模拟接口返回的数据
- const mockImageModels = [
- {
- name: "gpt-image-1",
- description: "gpt-image-1",
- pricing: "1",
- qualities: ["high", "medium", "low"],
- sizes: ["1024x1024", "1536x1024", "1024x1536", "auto"],
- styles: []
- },
- {
- name: "doubao-seedream-3-0-t2i-250415",
- description: "doubao-seedream-3-0-t2i-250415",
- pricing: "2.6",
- qualities: ["high", "medium", "low"],
- sizes: ["1024x1024", "1536x1024", "1024x1536", "auto"],
- styles: []
- }
- ];
-
- // 测试价格解析
- mockImageModels.forEach(model => {
- const creditCost = model.pricing ? parseFloat(model.pricing) : 0;
- expect(creditCost).toBeGreaterThan(0);
- expect(typeof creditCost).toBe('number');
- });
-
- // 测试第一个模型的价格
- const firstModel = mockImageModels[0];
- const firstModelPrice = parseFloat(firstModel.pricing);
- expect(firstModelPrice).toBe(1);
-
- // 测试第二个模型的价格
- const secondModel = mockImageModels[1];
- const secondModelPrice = parseFloat(secondModel.pricing);
- expect(secondModelPrice).toBe(2.6);
- });
-
- it('should handle missing pricing gracefully', () => {
- const modelWithoutPricing = {
- name: "test-model",
- description: "test-model",
- // pricing 字段缺失
- qualities: ["high", "medium", "low"],
- sizes: ["1024x1024"],
- styles: []
- };
-
- const creditCost = modelWithoutPricing.pricing ? parseFloat(modelWithoutPricing.pricing) : 0;
- expect(creditCost).toBe(0);
- });
-
- it('should handle invalid pricing gracefully', () => {
- const modelWithInvalidPricing = {
- name: "test-model",
- description: "test-model",
- pricing: "invalid",
- qualities: ["high", "medium", "low"],
- sizes: ["1024x1024"],
- styles: []
- };
-
- const creditCost = modelWithInvalidPricing.pricing ? parseFloat(modelWithInvalidPricing.pricing) : 0;
- expect(isNaN(creditCost)).toBe(true);
- });
-});