API Documentation
Chat Completions
Embeddings
Completions
Other APIs
Completions
Completions
POST
/
completions
Copy
curl https://gateway.obiguard.ai/v1/completions \
-H "Content-Type: application/json" \
-H "x-obiguard-api-key: $OBIGUARD_API_KEY" \
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Say this is a test",
"max_tokens": 7,
"temperature": 0
}'
Copy
{
"id": "<string>",
"choices": [
{
"finish_reason": "stop",
"index": 123,
"logprobs": {
"text_offset": [
123
],
"token_logprobs": [
123
],
"tokens": [
"<string>"
],
"top_logprobs": [
{}
]
},
"text": "<string>"
}
],
"created": 123,
"model": "<string>",
"system_fingerprint": "<string>",
"object": "text_completion",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}
Authorizations
Body
application/json
Response
200 - application/json
OK
Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
Copy
curl https://gateway.obiguard.ai/v1/completions \
-H "Content-Type: application/json" \
-H "x-obiguard-api-key: $OBIGUARD_API_KEY" \
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Say this is a test",
"max_tokens": 7,
"temperature": 0
}'
Copy
{
"id": "<string>",
"choices": [
{
"finish_reason": "stop",
"index": 123,
"logprobs": {
"text_offset": [
123
],
"token_logprobs": [
123
],
"tokens": [
"<string>"
],
"top_logprobs": [
{}
]
},
"text": "<string>"
}
],
"created": 123,
"model": "<string>",
"system_fingerprint": "<string>",
"object": "text_completion",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123
}
}
Assistant
Responses are generated using AI and may contain mistakes.