GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!

就在刚刚,OpenAI重磅发布GPT-4.1系列三款全新模型,号称“史上最小、最快、最便宜”!不仅体积更轻量,整体性能还全面超越GPT-4o及其mini版。

本次发布的GPT-4.1系列包括三款模型:GPT-4.1、GPT-4.1 mini 和 GPT-4.1 nano。三者均支持高达100万 tokens的上下文窗口,最大输出可达32768个 tokens,知识覆盖截止至2024年6月

根据OpenAI公布的基准测试结果,GPT-4.1系列在代码生成、指令执行以及长文本理解能力方面,全面领先于GPT-4o及GPT-4o mini,性能表现令人惊艳。

图片[1]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客

GPT-4.1 在各种编码任务上都比 GPT-4o 表现得更好,包括代理解决编码任务、前端编码、减少无关编辑、可靠地遵循差异格式、确保一致的工具使用等等。

图片[2]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客

虽然目前GPT-4.1系列模型需通过API调用,但是Cursor 和 Windsurf 都宣布,所有用户均可使用 GPT-4.1!现在我们可以通过第三方的平台来直接免费调用使用。

免费调用GPT 4.1的平台:

1、Cursor:【官方链接

Cursor虽然已经内置了GPT4.1模型,但是默认并未开启,需要在设置中心,找到Model选项,在里面勾选GPT4.1模型,就可以愉快的免费使用了!

图片[3]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客

图片[4]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客 图片[5]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客

2、Windsurf :【官方链接

相对来说,Windsurf 更显大方,因为官方有说明,即使是免费用户也可以无限免费使用GPT4.1模型,大家可以尽情使用,经过零度的测试,无论是代码生成,推理,图片识别能等,比之前的GPT -4o 好太多了!生成的代码直接完美运行,关键是生成速度极快!

图片[6]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客

图片[7]-GPT 4.1 正式发布!如何免费使用?2种方法可供白嫖!-零度博客

跑酷游戏代码,由 Cursor 中的GPT4.1 生成

// 袋鼠跑酷游戏 by AI
// 只需在p5.js编辑器中粘贴本代码即可运行

let kangaroo;
let obstacles = [];
let groundY;
let score = 0;
let gameOver = false;
let bgOffset = 0;

function setup() {
  createCanvas(600, 300);
  groundY = height - 40;
  kangaroo = new Kangaroo(60, groundY - 32);
  obstacles.push(new Obstacle(width + 40));
  textFont('monospace');
}

function draw() {
  background(135, 206, 235); // 天空蓝
  drawBackground();
  
  // 地面
  noStroke();
  fill(80, 200, 120);
  rect(0, groundY, width, 40);

  if (!gameOver) {
    kangaroo.update();
    kangaroo.show();
    
    // 障碍物逻辑
    for (let i = obstacles.length - 1; i >= 0; i--) {
      obstacles[i].update();
      obstacles[i].show();
      if (obstacles[i].hits(kangaroo)) {
        gameOver = true;
      }
      if (obstacles[i].offscreen()) {
        obstacles.splice(i, 1);
        score++;
      }
    }
    // 随机生成障碍物
    if (obstacles.length < 2 && random() < 0.02) {
      obstacles.push(new Obstacle(width + 40));
    }
    
    // 背景偏移
    bgOffset -= 2;
  } else {
    kangaroo.show();
    for (let obs of obstacles) obs.show();
    fill(0, 180);
    rect(width/2-90, height/2-40, 180, 60, 10);
    fill(255);
    textSize(20);
    textAlign(CENTER, CENTER);
    text('游戏结束', width/2, height/2-10);
    textSize(14);
    text('按R重来', width/2, height/2+18);
  }

  // 说明与得分
  fill(0, 180);
  rect(10, 10, 170, 50, 8);
  fill(255);
  textSize(14);
  textAlign(LEFT, TOP);
  text('空格:跳跃', 20, 18);
  text('得分:' + score, 20, 38);
}

function keyPressed() {
  if (key == ' ' && !gameOver) {
    kangaroo.jump();
  }
  if (gameOver && (key == 'r' || key == 'R')) {
    restartGame();
  }
}

function restartGame() {
  score = 0;
  gameOver = false;
  kangaroo = new Kangaroo(60, groundY - 32);
  obstacles = [new Obstacle(width + 40)];
  bgOffset = 0;
}

// 像素袋鼠类
class Kangaroo {
  constructor(x, y) {
    this.x = x;
    this.y = y;
    this.vy = 0;
    this.size = 32;
    this.onGround = true;
  }
  update() {
    this.vy += 1.2; // 重力
    this.y += this.vy;
    if (this.y >= groundY - this.size) {
      this.y = groundY - this.size;
      this.vy = 0;
      this.onGround = true;
    } else {
      this.onGround = false;
    }
  }
  jump() {
    if (this.onGround) {
      this.vy = -16;
    }
  }
  show() {
    push();
    translate(this.x, this.y);
    noSmooth();
    scale(2);
    // 袋鼠身体
    fill(180, 120, 60);
    rect(4, 8, 6, 8); // 身体
    rect(6, 4, 4, 4); // 头
    fill(120, 80, 40);
    rect(10, 6, 2, 2); // 耳朵
    rect(6, 6, 2, 2); // 耳朵
    fill(180, 120, 60);
    rect(2, 14, 4, 4); // 腿
    rect(10, 14, 2, 4); // 腿
    fill(200, 160, 90);
    rect(8, 12, 2, 2); // 肚子
    fill(180, 120, 60);
    rect(0, 10, 4, 2); // 尾巴
    pop();
  }
}

// 障碍物类
class Obstacle {
  constructor(x) {
    this.x = x;
    this.y = groundY - 20;
    this.w = random([16, 20, 24]);
    this.h = random([20, 24, 28]);
    this.type = random([0, 1]); // 0: 石头, 1: 仙人掌
  }
  update() {
    this.x -= 6;
  }
  show() {
    push();
    noSmooth();
    if (this.type == 0) {
      // 石头
      fill(100, 100, 100);
      rect(this.x, this.y + this.h - 12, this.w, 12, 3);
    } else {
      // 仙人掌
      fill(60, 180, 80);
      rect(this.x, this.y, this.w, this.h, 3);
      fill(80, 220, 100);
      rect(this.x + this.w/3, this.y + this.h/2, this.w/4, this.h/2, 2);
    }
    pop();
  }
  hits(k) {
    return (k.x + k.size > this.x && k.x < this.x + this.w && k.y + k.size > this.y);
  }
  offscreen() {
    return this.x + this.w < 0;
  }
}

// 像素背景
function drawBackground() {
  push();
  noSmooth();
  // 云
  for (let i = 0; i < 3; i++) {
    let cx = (i * 200 + bgOffset * 0.5) % width;
    fill(255, 255, 255, 200);
    rect(cx, 40, 32, 8, 4);
    rect(cx + 10, 36, 16, 8, 4);
  }
  // 树
  for (let i = 0; i < 4; i++) {
    let tx = (i * 160 + bgOffset * 0.8) % width;
    fill(100, 60, 30);
    rect(tx, groundY - 32, 6, 32);
    fill(60, 180, 80);
    rect(tx - 8, groundY - 44, 22, 16, 6);
  }
  pop();
}

可以直接在这个平台上运行使用:https://editor.p5js.org/

射击游戏代码:

由 windsurf 的 GPT4.1生成

// p5.js 炫酷射击游戏
// 作者:Cascade AI
// 玩法说明:
// - 鼠标左右移动飞船
// - 鼠标点击或按空格发射子弹
// - 击中敌人得分,漏掉敌人扣血
// - 血量为0游戏结束

let player;
let bullets = [];
let enemies = [];
let particles = [];
let score = 0;
let health = 5;
let gameState = 'start'; // 'start', 'playing', 'gameover'
let enemySpawnTimer = 0;
let bgStars = [];

function setup() {
  createCanvas(600, 800);
  player = new Player();
  for (let i = 0; i < 80; i++) {
    bgStars.push({
      x: random(width),
      y: random(height),
      speed: random(0.5, 2),
      size: random(1, 3)
    });
  }
}

function draw() {
  background(10, 20, 40);
  drawBgStars();
  if (gameState === 'start') {
    drawTitleScreen();
  } else if (gameState === 'playing') {
    runGame();
  } else if (gameState === 'gameover') {
    drawGameOver();
  }
}

function drawBgStars() {
  noStroke();
  fill(255, 255, 255, 180);
  for (let s of bgStars) {
    ellipse(s.x, s.y, s.size);
    s.y += s.speed;
    if (s.y > height) {
      s.y = 0;
      s.x = random(width);
    }
  }
}

function drawTitleScreen() {
  fill(255);
  textAlign(CENTER, CENTER);
  textSize(48);
  text('炫酷射击游戏', width/2, height/2 - 100);
  textSize(24);
  text('玩法说明:', width/2, height/2 - 30);
  textSize(20);
  text('1. 鼠标左右移动飞船', width/2, height/2);
  text('2. 鼠标点击或空格发射子弹', width/2, height/2 + 30);
  text('3. 击中敌人得分,漏掉敌人扣血', width/2, height/2 + 60);
  text('4. 血量为0游戏结束', width/2, height/2 + 90);
  textSize(24);
  fill(0, 255, 180);
  text('点击鼠标或按空格开始', width/2, height/2 + 160);
}

function runGame() {
  // 玩家
  player.update();
  player.show();

  // 子弹
  for (let b of bullets) b.update();
  for (let b of bullets) b.show();
  bullets = bullets.filter(b => !b.offscreen && !b.hit);

  // 敌人
  for (let e of enemies) e.update();
  for (let e of enemies) e.show();
  enemies = enemies.filter(e => !e.offscreen && !e.hit);

  // 粒子
  for (let p of particles) p.update();
  for (let p of particles) p.show();
  particles = particles.filter(p => !p.finished());

  // 碰撞检测
  for (let b of bullets) {
    for (let e of enemies) {
      if (!e.hit && !b.hit && dist(b.x, b.y, e.x, e.y) < e.size/2 + b.size/2) {
        e.hit = true;
        b.hit = true;
        score++;
        for (let i = 0; i < 25; i++) {
          particles.push(new Particle(e.x, e.y, e.col));
        }
      }
    }
  }
  for (let e of enemies) {
    if (!e.hit && e.y > height - 50) {
      e.hit = true;
      health--;
      for (let i = 0; i < 15; i++) {
        particles.push(new Particle(e.x, height-50, color(255,0,0)));
      }
      if (health <= 0) {
        gameState = 'gameover';
      }
    }
  }
  // 敌人生成
  enemySpawnTimer--;
  if (enemySpawnTimer <= 0) {
    enemies.push(new Enemy());
    enemySpawnTimer = int(random(25, 50));
  }
  // UI
  fill(255);
  textSize(22);
  textAlign(LEFT, TOP);
  text('分数: ' + score, 20, 20);
  text('血量: ' + health, 20, 50);
}

function drawGameOver() {
  fill(255, 60, 60);
  textAlign(CENTER, CENTER);
  textSize(48);
  text('游戏结束', width/2, height/2 - 60);
  textSize(30);
  fill(255);
  text('你的分数: ' + score, width/2, height/2);
  textSize(22);
  fill(0, 255, 180);
  text('点击鼠标或按空格重新开始', width/2, height/2 + 80);
}

function mousePressed() {
  if (gameState === 'start' || gameState === 'gameover') {
    restartGame();
  } else if (gameState === 'playing') {
    player.shoot();
  }
}

function keyPressed() {
  if (gameState === 'start' || gameState === 'gameover') {
    if (key === ' ' || key === 'Spacebar') restartGame();
  } else if (gameState === 'playing') {
    if (key === ' ' || key === 'Spacebar') player.shoot();
  }
}

function restartGame() {
  score = 0;
  health = 5;
  bullets = [];
  enemies = [];
  particles = [];
  gameState = 'playing';
}

// 玩家类
class Player {
  constructor() {
    this.x = width/2;
    this.y = height - 50;
    this.size = 60;
    this.cooldown = 0;
  }
  update() {
    this.x = constrain(mouseX, this.size/2, width-this.size/2);
    if (this.cooldown > 0) this.cooldown--;
  }
  show() {
    push();
    translate(this.x, this.y);
    noStroke();
    fill(0, 200, 255);
    ellipse(0, 0, this.size, this.size/2);
    fill(255, 255, 255, 200);
    ellipse(0, 0, this.size*0.5, this.size*0.18);
    pop();
  }
  shoot() {
    if (this.cooldown <= 0) {
      bullets.push(new Bullet(this.x, this.y - this.size/2));
      this.cooldown = 10;
    }
  }
}

// 子弹类
class Bullet {
  constructor(x, y) {
    this.x = x;
    this.y = y;
    this.size = 12;
    this.speed = 12;
    this.offscreen = false;
    this.hit = false;
  }
  update() {
    this.y -= this.speed;
    if (this.y < -this.size) this.offscreen = true;
  }
  show() {
    if (!this.hit) {
      noStroke();
      fill(255, 255, 0);
      ellipse(this.x, this.y, this.size, this.size*1.5);
      fill(255, 255, 255, 120);
      ellipse(this.x, this.y, this.size*0.4, this.size*0.8);
    }
  }
}

// 敌人类
class Enemy {
  constructor() {
    this.size = random(32, 48);
    this.x = random(this.size/2, width-this.size/2);
    this.y = -this.size/2;
    this.speed = random(2, 4) + score/20;
    this.hit = false;
    this.offscreen = false;
    this.col = color(random(120,255), random(60,180), random(60,255));
  }
  update() {
    this.y += this.speed;
    if (this.y > height + this.size) this.offscreen = true;
  }
  show() {
    if (!this.hit) {
      push();
      translate(this.x, this.y);
      noStroke();
      fill(this.col);
      ellipse(0, 0, this.size, this.size);
      fill(255, 255, 255, 60);
      ellipse(0, 0, this.size*0.5, this.size*0.5);
      pop();
    }
  }
}

// 粒子爆炸
class Particle {
  constructor(x, y, col) {
    this.x = x;
    this.y = y;
    this.vx = random(-3, 3);
    this.vy = random(-3, 3);
    this.alpha = 255;
    this.col = col;
  }
  update() {
    this.x += this.vx;
    this.y += this.vy;
    this.vy += 0.08;
    this.alpha -= 7;
  }
  show() {
    noStroke();
    fill(red(this.col), green(this.col), blue(this.col), this.alpha);
    ellipse(this.x, this.y, 8, 8);
  }
  finished() {
    return this.alpha < 20;
  }
}
THE END
喜欢就支持一下吧
点赞1793 分享
相关推荐
Telegram新规:私聊群聊可被举报,隐私保护引争议-零度博客

Telegram新规:私聊群聊可被举报,隐私保护引争议

  即时通讯工具 Telegram 的首席执行官帕维尔·杜罗夫近日在法国被捕,巴黎检察官对其提出多项指控,目前他正等待法院起诉。 在本周四晚间,Telegram 修改了其使用协议,似乎是向法国和其...
admin的头像-零度博客admin
2.6W+6249
IP雷达 5.0 网络流量和对外连接检测工具-零度博客

IP雷达 5.0 网络流量和对外连接检测工具

  IP雷达: 【点击下载】
admin的头像-零度博客admin
1.7W+2250
为什么黑客可以轻易入侵你的手机!获取里面全部资料!如何防止自己被黑?| 零度解说-零度博客
5款【神级软件】推荐!切勿错过,免费开源,吊打付费!!太实用了 | 零度解说-零度博客

5款【神级软件】推荐!切勿错过,免费开源,吊打付费!!太实用了 | 零度解说

https://youtu.be/dlHwGRDiifw ================== 窗口洞洞波下载:https://www.freedidi.com/13540.html Kando多级饼状菜单:https://www.freedidi.com/13545.html 网盘图标删除器:https://w...
超强的AI 视频生成模型!完全免费开源,生成质量极高!HunyuanVideo 模型-零度博客

超强的AI 视频生成模型!完全免费开源,生成质量极高!HunyuanVideo 模型

此开源的视频生成模型:包含 PyTorch 模型定义、预训练权重和推理/采样代码 📜 要求 下表为运行HunyuanVideo模型(batch size = 1)生成视频的要求: 模型 设置 (高度/宽度/框架) 去噪步骤 GP...
admin的头像-零度博客admin
3W+4322
担心用户流失!Netflix 推迟打击密码共享行为-零度博客

担心用户流失!Netflix 推迟打击密码共享行为

我们不止一次注意到 Netflix 的密码共享打击是一种 愚蠢的现金抢夺,并说明了该公司不可避免地从创新颠覆者转变为 Netflix 最初颠覆的那种廉价有线电视公司。 Netflix 在过去五年中最大的创新...
admin的头像-零度博客admin
1.2W+6539
WebGPU 在线抠图,一键去除图片背景,完全免费开源!-零度博客

WebGPU 在线抠图,一键去除图片背景,完全免费开源!

WebGPU 是一款可以在线抠图的程序,一键去除图片背景,完全免费开源!这是原图这是去除背景后的效果,去的非常干净! 1、在线使用 【点击前往】 2、GitHub、开源模型3、备用下载 【源码+模型...
admin的头像-零度博客admin
2.1W+5394
Lastpass 出事了! 用户密码数据被盗,你现在需要立即修改它们! | 零度解说-零度博客
让 Windows 11 变成 macOS ,只需要这几步  | 零度解说-零度博客

让 Windows 11 变成 macOS ,只需要这几步 | 零度解说

https://youtu.be/XS53v6re0Us     所需的工具下载:https://www.freedidi.com/2573.html