Updated on September 3, 2023: Directly integrated with Claude's paid API, the service has been resumed and is no longer free, entering production-ready status.Current Pricing:Claude2Input: $0.013224 / 1000 tokensOutput: $0.039216 / 1000 tokensSince the unit price per token is $0.004/1000 tokens, the conversion to tokens is:Input: 3300 tokens / 1000 tokens => 1 token ≈ 3.3 tokensOutput: 9800 tokens / 1000 tokens => 1 token ≈ 9.8 tokensThe parameters are more streamlined compared to the ChatCompletions interface, and the return format is consistent with OpenAI's ChatCompletions interface, which can be seen in the return example below.
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/x-www-form-urlencoded
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.ohmygpt.com/v1/claude/web/completion' \
--data-urlencode'model=claude-2-web' \
--data-urlencode'prompt=What is 1+1?' \
--data-urlencode'stream=false'