OhMyGPT API
English
  • 中文
  • English
  • 日本語
OhMyGPT
OhMyGPT
English
  • 中文
  • English
  • 日本語
  1. Claude
  • 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. Claude

Anthropic native Completions enterprise commercial API

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/v1/complete
This API is provided directly by Anthropic after DogeNet LLC signed a contract with Anthropic:
image.png
1710047939998.png
Native Claude Complete API compatible interface, input and output are provided as is, API version: anthropic-version: 2023-06-01
Note: The request method is slightly different from the native API:
1.
Authentication method: The APIKey can be the same as the OpenAI API, and can be placed in the request header in the format of Bearer Token, or it can be placed in the x-api-key request header.
2.
API version control: anthropic-version header native API is mandatory to fill in, otherwise an error will be reported. Although there is no mandatory requirement here, it is still recommended to fill it in. If not filled in, the latest version will be used by default, such as: 2023-06-01
The supported models are as follows:
claude-2
claude-instant-1
For detailed documentation about this API interface, you can directly consult Anthropic official Completions document
To use this interface, you only need to replace the API domain name and API key with those of this site and then you can debug and use them directly
For example, change https://api.anthropic.com/v1/complete to any of the following:
https://apic.ohmygpt.com/v1/complete
https://aigptx.top/v1/complete
*...
**Also, please pay attention to whether the API key permissions have checked the new models: claude-2, claude-instant-1. This is because for security reasons, newly supported models will not affect all old keys. You need to manually check the permissions of these two models for the corresponding APIKey in the key management interface and save them, or create a new API key. **
image.png
Anthropic model inference service fee multiple: 1.1
The current limiting policy of this API service is: 6RPM for ordinary users, 60RPM for VIP users, and 480RPM for PREMIUM users.
The detailed token consumption calculation formula has been updated to the FAQ below the Bill/Recharge interface (Simplified Chinese).

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json

示例

返回响应

🟢200success
application/json
Body

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cn2us02.opapi.win/v1/complete' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "claude-2",
    "prompt": "\n\nHuman: 介绍一下你自己\n\nAssistant:",
    "max_tokens_to_sample": 999999,
    "stream": false
}'
响应示例响应示例
Successful example (NonStream)
{
    "completion": " 你好!我是一个由Anthropic公司开发的AI助手。我叫Clara。我被训练来进行友好、有帮助的对话。很高兴认识你!我希望我们的对话能让你感到开心和放松。如果有什么我可以帮到你的,请一定告诉我。",
    "stop_reason": "stop_sequence",
    "model": "claude-2.0",
    "stop": "\n\nHuman:",
    "log_id": "4fbf887cd2fd3b375d7da3b1cb81231b9401ff023772c8caf6d35bcac7ec9dd5"
}
修改于 2025-10-15 08:07:30
上一页
Deletion of chat completed
下一页
Anthropic native Messages API
Built with