整理始皇接口【小白速食】

此贴主要适合小白服用,本人是一个对这个领域比较陌生的小白,我正在学习并尝试使用一些工具和技术,但是在某些方面可能还有些困惑和不足,我希望大家能够理解我的处境,并且给予一些指导和建议,帮助我更好地学习和成长。非常感谢您的帮助和支持!

cURL中的参数还请点击下方的 官方文档 跳转了解具体可修改值,只能帮到这里了,想上传GIF结果不支持,第三方图库我了解到的,不想以后没图看,故没有上传

用到的 access token 我白嫖的 DoneWell 佬友的,没有access token 就不需要往下看了

API接口

  1. 图片生成:https://api.oaifree.com/v1/images/generations
    对应官方 https://api.openai.com/v1/images/generations
    文档在:https://platform.openai.com/docs/api-reference/images/create

  2. 图片编辑:https://api.oaifree.com/v1/images/edits
    对应官方 https://api.openai.com/v1/images/edits
    文档在:https://platform.openai.com/docs/api-reference/images/createEdit

  3. 对话:https://api.oaifree.com/v1/chat/completions
    对应官方:https://api.openai.com/v1/chat/completions
    文档在:https://platform.openai.com/docs/api-reference/chat

  4. 语音合成:https://api.oaifree.com/v1/audio/speech
    对应官方 https://api.openai.com/v1/audio/speech
    文档在:https://platform.openai.com/docs/api-reference/audio/createSpeech

  5. 语音转录:https://api.oaifree.com/v1/audio/transcriptions
    对应官方 https://api.openai.com/v1/audio/transcriptions​
    文档在:https://platform.openai.com/docs/api-reference/audio/createTranscription

cRUl 示例
生图
curl --request POST \
  --url https://api.oaifree.com/v1/images/generations \
  --header 'Authorization: Bearer your_ access token' \
  --header 'content-type: application/json' \
  --data '{
  "model": "dall-e-3",
  "prompt": "Your Name Poster",
  "n": 2,
  "size": "1792x1024"
}'
修图
curl --request POST \
  --url https://api.oaifree.com/v1/images/edits \
  --header 'Authorization: Bearer your_ access token' \
  --header 'content-type: multipart/form-data' \
  --form image=@image \
  --form mask=@mask \
  --form 'prompt="Modify its eyes to bud"' \
  --form n=2 \
  --form 'size="1024x1024"'
对话
curl --request POST \
  --url https://api.oaifree.com/v1/chat/completions \
  --header 'Authorization: Bearer your_ access token' \
  --header 'content-type: application/json' \
  --data '{
  "model": "gpt-4",
  "messages": [
    {
      "role": "system",
      "content": "我想问你你是否知道linux.do这个社区,我希望使用中文和你进行沟通"
    },
    {
      "role": "user",
      "content": "这个社区整体帖子质量如何?"
    }
  ]
}'
语音合成
curl --request POST \
  --url https://api.oaifree.com/v1/audio/speech \
  --header 'Authorization: Bearer your_ access token' \
  --header 'content-type: application/json' \
  --data '{
  "model": "tts-1",
  "voice": "onyx",
  "input": "想要转音频的文本"
}'
语音转录
curl --request POST \
  --url https://api.oaifree.com/v1/audio/transcriptions \
  --header 'Authorization: Bearer your_access token' \
  --header 'content-type: multipart/form-data' \
  --form file=@file \
  --form 'model="whisper-1"'
  • API开发工具,用于测试、调试和共享HTTP API的免费开源工具
  • 用到的 access token
  • 看不懂English的可以在侧边栏中设置语言为简体中文

  • 点击小下标箭头点击第一个导入cURL,这里的curl可以使用官方文档中的案例,也可以使用上方提供的cURl,具体按照自身要求进行修改

  • 替换为有效的access token,也可以使用上方 DoneWell分享的 access token

229 个赞

少一个音频转文字

22 个赞

好东西,收藏了

4 个赞

感谢整理,学习中。

3 个赞

添加了,搞忘了,谢提醒

4 个赞

好好好

3 个赞

非常完美~~ 感谢大佬整理

3 个赞

古德

3 个赞

速食

3 个赞

感谢整理

3 个赞

感谢楼主整理 吃的饱饱的

2 个赞

牛博一

3 个赞

赶紧收藏

3 个赞

先收藏了啊~~

2 个赞

强呀~

2 个赞

始皇你的官转网站是哪个啊

3 个赞

坐等文转视频

1 个赞

去双子域名, api.oaipro.com


左手:api.oaifree.com
右手:api.oaipro.com

双子com域名的含金量谁懂啊 :grinning:

23 个赞

无需加热,开袋即食

2 个赞

谁知道这个官网获得的access token
有效期是多久啊 chat.openai.com/api/auth/session这个地址的

3 个赞