> For the complete documentation index, see [llms.txt](https://zero2launch.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zero2launch.gitbook.io/docs/chat-and-text-generation.md).

# Chat & Text Generation

## POST /generate-text

> Generates text based on input messages

```json
{"openapi":"3.0.3","info":{"title":"Zero2Launch API","version":"1.7"},"tags":[{"name":"Chat & Text Generation"}],"servers":[{"url":"https://api.zero2launch.com","description":"Main API Server"},{"url":"https://tools.zero2launch.com","description":"Tools Server (FFmpeg, etc.)"}],"security":[{"apikey":[]}],"components":{"securitySchemes":{"apikey":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"TextInput":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string"}}},"default":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":""}]},"model":{"type":"string","default":"openai","description":"Model name","enum":["openai","gemini-3.5-flash-thinking","gemini-3.6-flash"]}},"title":"TextInput"},"TextOutput":{"type":"object","properties":{"text":{"type":"string","description":"Generated text"}},"title":"TextOutput"}}},"paths":{"/generate-text":{"post":{"operationId":"post_text_generation","summary":"Generates text based on input messages","tags":["Chat & Text Generation"],"parameters":[{"description":"An optional fields mask","in":"header","name":"X-Fields","schema":{"format":"mask","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextInput"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextOutput"}}}}}}}}}
```

## GET /generate-text/models

> List available text models

```json
{"openapi":"3.0.3","info":{"title":"Zero2Launch API","version":"1.7"},"tags":[{"name":"Chat & Text Generation"}],"servers":[{"url":"https://api.zero2launch.com","description":"Main API Server"},{"url":"https://tools.zero2launch.com","description":"Tools Server (FFmpeg, etc.)"}],"paths":{"/generate-text/models":{"get":{"operationId":"get_text_models","summary":"List available text models","tags":["Chat & Text Generation"],"responses":{"200":{"description":"Success"}}}}}}
```
