OhMyGPT API
English
  • 中文
  • English
  • 日本語
OhMyGPT
OhMyGPT
English
  • 中文
  • English
  • 日本語
  1. OAuth开放API
  • Introduction to this site
  • Change log
  • OpenAI
    • Responses
      • Create model response
      • Get model response
      • Delete model response
      • Cancel response
      • List input items
    • Conversations
      • create conversation
      • Retrieve conversation
      • update conversation
      • delete conversation
      • Create items
      • list items
      • Retrieve item
      • Delete item
    • create completion
      POST
    • TTS text to speech
      POST
    • Embeddings
      POST
    • image generation
      POST
    • image editing
      POST
  • Store
    • List chat completions
      POST
    • Get chat completed
      POST
    • Deletion of chat completed
      POST
  • Claude
    • Anthropic native Completions enterprise commercial API
      POST
    • Anthropic native Messages API
      POST
    • Anthropic native Messages Token Count API
      POST
  • OAuth开放API
    • Introduction to Open OAuth API
    • User authorization page
      GET
    • Code display page
      GET
    • Apply for access_token
      POST
    • Read basic user information
      POST
    • Read user balance information
      POST
    • Charge user fees
      POST
    • Create a Stripe Checkout recharge order for the user
      POST
    • Create a Stripe Invoice recharge order for the user
      POST
    • Call other open APIs
      POST
    • Read user management token through OAuth Token
      POST
    • Update user management token through OAuth Token
      POST
  • other
    • search
      • Google Custom Search API
      • Google Search By Serper
    • Azure
      • Azure text-to-speech
      • Azure gets TTS voice list
  • Override rules
    • Create rules
    • Update rules
    • delete rule
    • Get rules
    • list rules
    • Batch enable/disable
    • Copy rules
    • test rules
    • Get statistics
    • Get restriction configuration
    • Check rule name
    • Batch delete
    • Export rules
    • Import rules
  • image generation
    • other
      • ND image generation API
    • Flux
      • Flux Schnell image generation
      • Flux Dev image generation
      • Flux Pro image generation
      • Flux Pro 1.1 image generation
      • Flux 1.1 Pro Ultura image generation
  • Storage service
    • File storage service
    • File upload
    • File information update
    • Delete files
    • User query (pagination)
    • User metadata query (by fileUinqueIds)
    • File download interface (Public file download)
    • File download interface (Private private file download)
    • Obtain public file metadata
  • API KEY management
    • Create new API Key
    • Modify API Key information
    • Query all API Keys of the user
    • Delete the specified API Key
    • Interface for querying user membership expiration date
    • User balance query interface
    • Query the current model magnification interface
  • Archive documents
    • Self-service invoicing system usage documentation
    • Telegram Bot usage documentation
    • Self-built Cloudflare Worker anti-generation tutorial
    • Claude Code forwarding service
    • CodeX forwarding service
    • Introduction to the new website
  • Model list
    GET
  1. OAuth开放API

Introduction to Open OAuth API

Introduction#

Open Authorization (OAuth) is an open standard that allows users to let third-party applications access the user's private resources (such as photos, videos, contact lists) stored on a website without providing usernames and passwords to third-party applications.
This website now provides a set of open OAuth API interfaces to facilitate interested developers to connect their projects to the website, thereby quickly connecting various AI capabilities to your projects. At the same time, there is no need to pay attention to miscellaneous matters such as user management, API integration, and billing. Focus on the development and implementation of functions, while also having the opportunity to obtain rewards, profits, and shares.
Currently, you can achieve this by accessing the API of this site:
-Access the user's UID and email to verify the user's identity
Check user's account balance
Access various APIs on behalf of users through authorization tokens, such as OpenAI, Anthropic and other API services
When calling some APIs or services, you can get some shares into your developer account, and you can apply for withdrawal
Actively deduct tokens from user accounts and transfer them to your developer account, and you can apply for withdrawal
Create recharge orders for users to facilitate users to recharge their accounts
Note: Some OAuth App permissions and creative incentives need to be applied for and verified by the developer before they can be used.

Introduction to use#

Introduction to the new website#

The website is currently developing a new version of the website using new front-end technology (Next.js). OAuth related functions have been implemented on this website. You can experience it immediately through the following addresses:
Main site Next (requires wall support): https://next.ohmygpt.com
Mirror Next: https://next.aigptx.top

Introduction to OAuth authorization process#

1.
Create an OAuth App and obtain the Client ID and Client Secret of this App
2.
Read the "User Authorization Page" API document, splice the URL and ask the user to open this link for authorization.
3.
After the user is authorized, the user side will obtain a Code and jump to the redirect URL you set. At this time, you can choose any of the following implementation methods to obtain the Code:
a. Implement the corresponding Get interface and obtain the Code
b. Jump to the Code display page and let users manually copy and paste the Code into your App.
4.
After getting the Code, you can use your Client ID+Client Secret+Code to obtain this user's OAuth Token through the "Apply for access_token" API
5.
After getting the OAuth Token, you can use this OAuth Token to access various APIs. Please use it rationally and keep the Token properly.

Create your OAuth App#

Enter the new version of the website, click "Settings" => "Developer" and find the "Create a new OAuth APP" card:
image.png
Enter your application name, description (Markdown supported) and other information, and click the Create button:
image.png
After successful creation, you will get the ID and key of the OAuth App:
image.png

Manage OAuth App#

You can view and manage the OAuth App under your name in the "Developer OAuth App Management" tab:
image.png
Click the edit button to edit the application information and configuration.
Example:
https://next.aigptx.top/next/v1/oauth?response_type=code&client_id=6681463833ebdbb2566d1def&redirect_uri=https://wiki.getletbot.com/api/authorize&scope=general_api_access
image.png

API documentation#

For more API details, please pay attention to the API documentation in this directory.

About developer certification#

In order to ensure user security and compliant operations, we need to verify your identity to allow you to create an OAuth App with trusted_advanced_access permissions, open a developer income account, and apply for withdrawals, etc.
Please apply to open a verified developer account through the customer service email (help@ohmygpt.com) or TG administrator. You may need to introduce the project you are currently developing or want to access the advanced OAuth API, your GitHub account and remuneration payment method, etc.
修改于 2025-10-15 08:07:31
上一页
Anthropic native Messages Token Count API
下一页
User authorization page
Built with