cURL
curl --request POST \ --url https://api.usesecond.com/openai/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "<string>", "prompt": "<string>", "best_of": 1, "echo": false, "frequency_penalty": 0, "logit_bias": {}, "logprobs": 123, "max_tokens": 16, "n": 1, "presence_penalty": 0, "seed": 689760, "stop": [ "<string>" ], "stream": false, "stream_options": { "include_usage": false }, "tempature": 1, "top_p": 1, "user": "<string>" }'
{ "id": "<string>", "object": "text_completion", "created": 1722811396105, "model": "<string>", "system_fingerprint": "<string>", "choices": [ { "text": "<string>", "index": 123, "logprobs": { "tokens": [ "<string>" ], "token_logprobs": [ 123 ], "top_logprobs": [ {} ], "text_offset": [ 123 ] }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123 } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Successful response
The response is of type object.
object