Native Claude Complete API-compatible interface, inputs and outputs provided as-is, API version: anthropic-version: 2023-06-01.Note: There is a slight difference in the way requests are made with the native API:
1.
authentication method: APIKey, like OpenAI's API, is placed in the request header in the format of a Bearer Token instead of in the x-api-key request header
2.
API version control: anthropic-version header native API is mandatory to fill in, otherwise it will report an error, although it is not mandatory here, but still recommended to fill in, if you do not fill in the default use of the current latest version, such as: 2023-06-01.
supported models:
claude-2
claude-instant-1
Detailed documentation on this API can be found at Anthropic Official Completions DocumentationTo 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 it directly.For example, change https://api.anthropic.com/v1/complete to any one of the following:
https://apic.ohmygpt.com/v1/complete
https://aigptx.top/v1/complete
...
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
Example
{"model":"claude-2","prompt":"\n\nHuman: Say test\n\nAssistant:","max_tokens_to_sample":999999,"stream":false}
{"completion":" I do not actually speak, I am an AI assistant created by Anthropic to be helpful, harmless, and honest.","stop_reason":"stop_sequence","model":"claude-2.0","stop":"\n\nHuman:","log_id":"5f0e0b3b63866c8c307085b87e2540d8f991ed7a7532621e312c575e5a9f0d07"}