# OpenAI Integration via LowCodeAPI

**Last Updated**: February 10, 2026

## Overview
GPT models and AI services

**Categories:**
- {'id': 'image-generation', 'name': 'Image Generation AI'}

## Base Endpoint
https://api.lowcodeapi.com/openai

**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`

## Authentication
**Type:** TOKEN

**Official Documentation:** https://platform.openai.com/docs/api-reference/introduction

## URL Format (Important)

LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.

### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`

### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`

### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider

## API Categories

## Common Endpoints

### Create chat completion

**Method:** POST
**LowCodeAPI Path:** /v1/chat/completions

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/chat/completions?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/chat/completions?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| frequency_penalty | number |  |
| logit_bias | number |  |
| logprobs | boolean |  |
| max_tokens | number |  |
| messages | array |  |
| model | string |  |
| n | number |  |
| parallel_tool_calls | boolean |  |
| presence_penalty | number |  |
| response_format | object |  |
| seed | string |  |
| stream | boolean |  |
| stream_options | object |  |
| temperature | number |  |
| tool_choice | object |  |
| tools | array |  |
| top_logprobs | number |  |
| top_p | number |  |
| user | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/chat/completions?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/chat/create

### Create transcription

**Method:** POST
**LowCodeAPI Path:** /v1/audio/transcriptions

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/audio/transcriptions?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/audio/transcriptions?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| file | file |  |
| language | string |  |
| model | string |  |
| prompt | string |  |
| response_format | string |  |
| temperature | number |  |
| timestamp_granularities[] | array |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/audio/transcriptions?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/audio/createTranscription

### Create translation

**Method:** POST
**LowCodeAPI Path:** /v1/audio/translations

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/audio/translations?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/audio/translations?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| file | file |  |
| model | string |  |
| prompt | string |  |
| response_format | string |  |
| temperature | number |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/audio/translations?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/audio/createTranslation

### Create image

**Method:** POST
**LowCodeAPI Path:** /v1/images/generations

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/images/generations?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/images/generations?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| model | number |  |
| n | number |  |
| prompt | string |  |
| quality | string |  |
| response_format | string |  |
| size | string |  |
| style | string |  |
| user | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/images/generations?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/images/create

### Create image edit

**Method:** POST
**LowCodeAPI Path:** /v1/images/edits

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/images/edits?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/images/edits?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| image | file |  |
| mask | file |  |
| model | string |  |
| n | number |  |
| prompt | string |  |
| response_format | string |  |
| size | string |  |
| user | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/images/edits?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/images/createEdit

### Create image variations

**Method:** POST
**LowCodeAPI Path:** /v1/images/variations

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/images/variations?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/images/variations?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| image | file |  |
| model | string |  |
| n | number |  |
| response_format | string |  |
| size | string |  |
| user | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/images/variations?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/images/createVariation

### Create assistant

**Method:** POST
**LowCodeAPI Path:** /v1/assistants

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| description | string |  |
| instructions | string |  |
| metadata | number |  |
| model | number |  |
| name | string |  |
| response_format | object |  |
| temperature | number |  |
| tool_resources | object |  |
| tools | array |  |
| top_p | number |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/assistants?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/assistants/createAssistant

### Retrieve assistant

**Method:** GET
**LowCodeAPI Path:** /v1/assistants/{assistant_id}

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants/{assistant_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants/assistant_id?assistant_id={assistant_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| assistant_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/openai/v1/assistants/{assistant_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/assistants/getAssistant

### Modify assistant

**Method:** POST
**LowCodeAPI Path:** /v1/assistants/{assistant_id}

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants/{assistant_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants/assistant_id?assistant_id={assistant_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| assistant_id | string |  |

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| description | string |  |
| file_ids | array |  |
| instructions | string |  |
| metadata | number |  |
| model | number |  |
| name | string |  |
| response_format | object |  |
| temperature | number |  |
| tools | array |  |
| top_p | number |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/openai/v1/assistants/{assistant_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/assistants/modifyAssistant

### Delete assistant

**Method:** DELETE
**LowCodeAPI Path:** /v1/assistants/{assistant_id}

**New Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants/{assistant_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/openai/v1/assistants/assistant_id?assistant_id={assistant_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| assistant_id | string |  |

**Example Request (New Format):**

```bash
curl -X DELETE 'https://api.lowcodeapi.com/openai/v1/assistants/{assistant_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://platform.openai.com/docs/api-reference/assistants/deleteAssistant


## Usage Examples

### Example 1: Basic Chat Completion

Creating a simple text completion or chat message:

```bash
# Create a chat completion - no path parameters needed
curl -X POST "https://api.lowcodeapi.com/openai/v1/chat/completions?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-name",
    "messages": [
      {"role": "user", "content": "Hello, how can you help me?"}
    ]
  }'

# Response includes generated content
```

### Example 2: Text Generation with Path Parameters

Generating text with specific model settings:

```bash
# Generate content using a specific model
curl -X POST "https://api.lowcodeapi.com/openai/v1/models/generate?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a short poem about technology",
    "max_tokens": 100
  }'

# Or if the provider uses model in the path:
curl -X POST "https://api.lowcodeapi.com/openai/v1/models/{MODEL_ID}:generateContent?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "Write a short story"}]}]
  }'
```

### Example 3: List Available Models

```bash
# Get list of available models
curl -X GET "https://api.lowcodeapi.com/openai/v1/models?api_token=YOUR_API_TOKEN"
```

## Error Handling

LowCodeAPI returns standard HTTP status codes. Common errors:

| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |

All error responses include error details:

```json
{
  "data": {
    "error": {
      "message": "Error description",
      "code": "ERROR_CODE"
    }
  }
}
```

## Complete Endpoint Reference

| Endpoint | Method | Category |
|----------|--------|----------|
| Create chat completion | POST | Chat |
| Create transcription | POST | Audio |
| Create translation | POST | Audio |
| Create image | POST | Images |
| Create image edit | POST | Images |
| Create image variations | POST | Images |
| Create assistant | POST | Assistants |
| Retrieve assistant | GET | Assistants |
| Modify assistant | POST | Assistants |
| Delete assistant | DELETE | Assistants |
| List assistants | GET | Assistants |
| Create speech | POST | Audio |
| Create embeddings | POST | Embeddings |
| List Files | GET | Files |
| Upload files | POST | Files |
| Delete files | DELETE | Files |
| Retrieve files | GET | Files |
| Retrieve files content | GET | Files |
| Create fine-tuning job | POST | Fine Tunes  |
| List fine-tuning jobs | GET | Fine Tunes  |
| List fine-tuning events | GET | Fine Tunes  |
| List fine-tuning checkpoints | GET | Fine Tunes  |
| Retrieve fine-tuning job | GET | Fine Tunes  |
| Cancel fine-tuning | POST | Fine Tunes  |
| Create message | POST | Messages |
| Retrieve message | GET | Messages |
| Modify message | POST | Messages |
| List messages | GET | Messages |
| Delete message | DELETE | Messages |
| List models | GET | Models |
| Delete fine-tune model | DELETE | Models |
| Retrieve model | GET | Models |
| Create moderations | POST | Moderations |
| Retrieve run step | GET | Run steps |
| List run steps | GET | Run steps |
| Create run | POST | Runs |
| Retrieve run | GET | Runs |
| Modify run | POST | Runs |
| List runs | GET | Runs |
| Submit tool outputs to run | POST | Runs |
| Cancel a run | POST | Runs |
| Create thread and run | POST | Runs |
| Create thread | POST | Threads |
| Retrieve thread | GET | Threads |
| Modify thread | POST | Threads |
| Delete thread | DELETE | Threads |
| Create batch | POST | Batch |
| List batches | GET | Batch |
| Retrieve batch | GET | Batch |
| Cancel batch | POST | Batch |
| Create vector store | POST | Vector Stores |
| List vector stores | GET | Vector Stores |
| Retrieve vector store | GET | Vector Stores |
| Modify vector store | POST | Vector Stores |
| Delete vector store | DELETE | Vector Stores |
| Create vector store file | POST | Vector Stores |
| List vector store files | GET | Vector Stores |
| Retrieve vector store file | GET | Vector Stores |
| Delete vector store file | DELETE | Vector Stores |

## API Definition Endpoints

You can fetch the complete API specification for this provider:

**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/openai/openapi'
```

**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/openai/definition'
```

## Response Format

All responses are wrapped in a `data` key:

```json
{
  "data": {
    // Actual response from provider (object or array)
  }
}
```