openapi: 3.2.0 info: title: LiteLLM Completions API description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs** 👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login``` 💸 ```LiteLLM Model Cost Map```. 🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**' version: 1.102.1 tags: - name: Completions paths: /openai/deployments/{model}/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` ```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d ''{ "model": "gpt-3.5-turbo-instruct", "prompt": "Once upon a time", "max_tokens": 50, "temperature": 0.7 }'' ```' operationId: completion_openai_deployments__model__completions_post security: - APIKeyHeader: [] parameters: - name: model in: path required: true 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' /engines/{model}/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` ```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d ''{ "model": "gpt-3.5-turbo-instruct", "prompt": "Once upon a time", "max_tokens": 50, "temperature": 0.7 }'' ```' operationId: completion_engines__model__completions_post security: - APIKeyHeader: [] parameters: - name: model in: path required: true 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' /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` ```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d ''{ "model": "gpt-3.5-turbo-instruct", "prompt": "Once upon a time", "max_tokens": 50, "temperature": 0.7 }'' ```' operationId: completion_completions_post security: - APIKeyHeader: [] 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' /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` ```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d ''{ "model": "gpt-3.5-turbo-instruct", "prompt": "Once upon a time", "max_tokens": 50, "temperature": 0.7 }'' ```' operationId: completion_v1_completions_post security: - APIKeyHeader: [] 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' components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key