# huggingface OpenAPI overview

> Below is an overview of the huggingface openapi in simple language. This API contains 12 endpoints.

For more detailed information of an endpoint, visit https://oapis.org/summary/huggingface/[idOrRoute]

Text Generation Inference v3.3.6-dev0 - 
Text Generation Webserver

## Text Generation Inference

Hugging Face Text Generation Inference API

- [compat_generate](https://oapis.org/openapi/huggingface/compat_generate): POST / - Generate tokens if `stream == false` or a stream of token if `stream == true`
- [get_chat_tokenize](https://oapis.org/openapi/huggingface/get_chat_tokenize): POST /chat_tokenize - Template and tokenize ChatRequest
- [generate](https://oapis.org/openapi/huggingface/generate): POST /generate - Generate tokens
- [generate_stream](https://oapis.org/openapi/huggingface/generate_stream): POST /generate_stream - Generate a stream of token using Server-Sent Events
- [health](https://oapis.org/openapi/huggingface/health): GET /health - Health check method
- [get_model_info](https://oapis.org/openapi/huggingface/get_model_info): GET /info - Text Generation Inference endpoint info
- [sagemaker_compatibility](https://oapis.org/openapi/huggingface/sagemaker_compatibility): POST /invocations - Generate tokens from Sagemaker request
- [metrics](https://oapis.org/openapi/huggingface/metrics): GET /metrics - Prometheus metrics scrape endpoint
- [tokenize](https://oapis.org/openapi/huggingface/tokenize): POST /tokenize - Tokenize inputs
- [chat_completions](https://oapis.org/openapi/huggingface/chat_completions): POST /v1/chat/completions - Generate tokens
- [completions](https://oapis.org/openapi/huggingface/completions): POST /v1/completions - Generate tokens
- [openai_get_model_info](https://oapis.org/openapi/huggingface/openai_get_model_info): GET /v1/models - Get model info
