AI/ML API access for GPT and other models
https://api.openai.com/v1/chat/completions
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model ID (e.g., gpt-4, gpt-3.5-turbo) |
| messages | array | required | List of messages |
| temperature | number | optional | Sampling temperature (0-2) |
| max_tokens | integer | optional | Maximum tokens to generate |
| top_p | number | optional | Nucleus sampling parameter |
| stream | boolean | optional | Stream the response |
/completions
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model ID |
| prompt | string | required | Prompt text |
| max_tokens | integer | optional | Maximum tokens |
| temperature | number | optional | Temperature |
/embeddings
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model ID (e.g., text-embedding-ada-002) |
| input | string | required | Text to embed |
/models
/models/{model}
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | required | Model ID |
/images/generations
| Param | Type | Required | Description |
|---|---|---|---|
| prompt | string | required | Image description |
| model | string | optional | Model (dall-e-2 or dall-e-3) |
| n | integer | optional | Number of images |
| size | string | optional | Image size (256x256, 512x512, 1024x1024) |
| quality | string | optional | Quality (standard or hd, dall-e-3 only) |
/audio/transcriptions
| Param | Type | Required | Description |
|---|---|---|---|
| file | string | required | Audio file path |
| model | string | required | Model (whisper-1) |
| language | string | optional | Language code |