# Completions

## Completion

> Follows the exact same API spec as \`OpenAI's Completions API <https://platform.openai.com/docs/api-reference/completions\\`\\>
> \
> \`\`\`bash\
> curl -X POST <http://localhost:4000/v1/completions> \
> -H "Content-Type: application/json" \
> -H "Authorization: Bearer sk-1234" \
> -d '{\
> &#x20;   "model": "OPL-7B-Customer-Support",\
> &#x20;   "prompt": "Once upon a time",\
> &#x20;   "max\_tokens": 50,\
> &#x20;   "temperature": 0.7\
> }'\
> \`\`\`

````json
{"openapi":"3.1.0","info":{"title":"LLM APIs","version":"1.70.0"},"security":[{"APIKeyHeader":[]}],"components":{"securitySchemes":{"APIKeyHeader":{"type":"apiKey","description":"Bearer token","in":"header","name":"x-llm-api-key"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/completions":{"post":{"tags":["completions"],"summary":"Completion","description":"Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`\n\n```bash\ncurl -X POST http://localhost:4000/v1/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n    \"model\": \"OPL-7B-Customer-Support\",\n    \"prompt\": \"Once upon a time\",\n    \"max_tokens\": 50,\n    \"temperature\": 0.7\n}'\n```","operationId":"completion_v1_completions_post","parameters":[{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
````
