--- title: "OpenAI compatibility" slug: "clovastudio-openaicompatibility" updated: 2026-09-17T09:35:47Z published: 2026-09-17T09:35:47Z canonical: "api.ncloud-docs.com/clovastudio-openaicompatibility" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # OpenAI compatibility Available in Classic and VPC The CLOVA Studio service provides compatibility with OpenAI API for major APIs, including Chat Completions and Embedding. ## Compatible APIs The list of APIs compatible with OpenAI API in CLOVA Studio is as follows: | API | Method | URI | | --- | --- | --- | | Chat Completions, Chat Completions v3 | POST | `/chat/completions` | | Embedding, Embedding v2 | POST | `/embeddings` | | Get model. | GET | `/models` | ## Usage method The following describes the request format and response format of the OpenAI-compatible APIs. ### Request By adjusting some of the request items in the CLOVA Studio API, you can use the OpenAI official library (SDK) and REST API. #### API key Use the test or service API key issued by the CLOVA Studio service. Caution The OpenAI-compatible APIs can only be used with a test API key or service API key issued from **[API key]** in CLOVA Studio. #### API URL The request API URL is as follows: ``` https://clovastudio.stream.ntruss.com/v1/openai/ ``` #### Model Enter the model name provided by the CLOVA Studio service as the model name in the request body. #### Naming rule The naming rule for request fields follows snake_case notation. Note Note that it differs from CLOVA Studio's Chat Completions (including V3), Embedding API field naming convention, which follows camelCase notation. For the list of supported/unsupported fields, see [Compatibility information](/docs/en/clovastudio-openaicompatibility#%ED%98%B8%ED%99%98%EC%A0%95%EB%B3%B4). ### Response It supports response results with the same structure and format as the OpenAI API. ## SDK examples The following is an example of using the CLOVA Studio service by utilizing the official OpenAI library. ### Python The example written in Python is as follows: ``` from openai import OpenAI client = OpenAI( api_key="CLOVA_STUDIO_API_KEY", # CLOVA Studio API key base_url="https://clovastudio.stream.ntruss.com/v1/openai" # CLOVA Studio OpenAI-compatible API URL ) # Chat Completions response = client.chat.completions.create( model="HCX-005", # CLOVA Studio supported model name messages=[ {"role": "system", "content": "You're a skilled AI assistant."}, {"role": "user", "content": "Please explain artificial intelligence."} ] ) print(response.choices[0].message.content) # Embeddings embedding = client.embeddings.create( model="bge-m3", # CLOVA Studio supported model name (embedding) input="Thank you for using CLOVA Studio.", encoding_format="float" # Must be set when using embedding with the OpenAI Python SDK (Base64 not supported). ) print(embedding.data[0].embedding) ``` Caution If you want to use embedding with the official OpenAI Python library, `encoding_format="float"` is a required setting. ### TypeScript/JavaScript (Node.js) The example written in TypeScript/JavaScript (Node.js) is as follows: ``` import OpenAI from "openai"; const openai = new OpenAI({ baseURL: "https://clovastudio.stream.ntruss.com/v1/openai", // CLOVA Studio OpenAI-compatible API URL apiKey: "YOUR_API_KEY", }); // CLOVA Studio API key // Chat Completions const completion = await openai.chat.completions.create({ model: "HCX-005", // CLOVA Studio supported model name messages: [ {"role": "system", "content": "You're a skilled AI assistant."}, {"role": "user", "content": "Please explain artificial intelligence."} ] }); console.log(completion.choices[0].message); // Embedding const embedding = await openai.chat.completions.create({ model: "bge-m3", // CLOVA Studio supported model name (embedding) input: "Thank you for using CLOVA Studio." }); console.log(embedding.data[0].embedding); ``` Note You can use CLOVA Studio through open source frameworks implemented with OpenAI's official SDK and compatible APIs in various languages. ## Compatibility information This section provides detailed compatibility information for each API compatible with the OpenAI API. For the input format and scope of supported fields and CLOVA Studio-specific fields, see the relevant API guide. ### Chat Completions/Chat Completions v3 The OpenAI compatibility information for Chat Completions API and Chat Completions v3 API is as follows: | Supported field | Unsupported field | CLOVA Studio-specific field | | --- | --- | --- | | - `messages` - `messages[].name` - `model` - `stream` - `max_completion_tokens` (default: 512) - `max_tokens` (default: 512) - `n` - `temperature` - `tools` - `tool_choice` - `parallel_tool_calls` - `reasoning_effort` \| `reasoning.effort` - `response_format` - `top_p` - `stop` - `seed` | - `audio` - `frequency_penalty` - `logit_bias` - `logprobs` - `metadata` - `modalities` - `prediction` - `presence_penalty` - `prompt_cache_key` - `safety_identifier` - `service_tier` - `store` - `stream_options` - `top_logprobs` - `user` - `web_search_options` | - `top_k` - `repeat_penalty` - `repetition_penalty` | Note The following fields provide compatibility to the extent supported by CLOVA Studio. - `n`: `1` (valid value, default) - `tool_choice`: `auto` (default) | `none` | object (call specific tools) - `parallel_tool_calls`: `true` (valid value, default) - `reasoning_effort` (or `reasoning.effort`): `none` | `low` | `medium` | `high` - `response_format.type`: `json_schema` (valid value) - `response_format.json_schema.name`: Optional support (input not recognized) - `response_format.json_schema.strict`: Optional support (input not recognized) ### Embedding, Embedding v2 The OpenAI compatibility information for the Embedding API and Embedding v2 API is as follows: | Supported field | Unsupported field | CLOVA Studio-specific field | | --- | --- | --- | | - `input` - `model` - `dimensions` - `encoding_format` | - `user` | - | Note The following fields provide compatibility to the extent supported by CLOVA Studio. - `dimensions`: `1024` (valid value, default) - `encoding_format`: `float` (valid value, default)