diff --git a/docs/api_cpp/source_en/api.md b/docs/api_cpp/source_en/api.md
index e0c9aead9a5e5a1a083f5a37611c3436fd7ee6f0..2300ce56b644533b8baa526d4fdd07084c593c76 100644
--- a/docs/api_cpp/source_en/api.md
+++ b/docs/api_cpp/source_en/api.md
@@ -1,80 +1,328 @@
# mindspore::api
-
+
-## Context
+## Context(for mindspore)
\#include <[context.h](https://gitee.com/mindspore/mindspore/blob/master/include/api/context.h)>
The Context class is used to store environment variables during execution.
+// to-do
+
+## Context(for mindspore-lite)
+
+\#include <[context.h](https://gitee.com/mindspore/mindspore/blob/master/include/api/context.h)>
+
+\#include <[lite_context.h](https://gitee.com/mindspore/mindspore/blob/master/include/api/lite_context.h)>
+
+The Context class is used to store environment variables during execution.
+
### Static Public Member Function
-#### Instance
+#### Clear
```cpp
-static Context &Instance();
+static void Clear(const std::shared_ptr &contxet);
```
-Obtains the MindSpore Context instance object.
+Clears the variables of a Context object.
-### Public Member Functions
+- Parameters
+
+ - `context`: the Context object to clear.
+
+#### SetAsDefault
+
+```cpp
+static void SetAsDefault(const std::shared_ptr &contxet);
+```
+
+Sets the variables of a Context object as default.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+
+#### SetVendorName
+
+```cpp
+static void SetVendorName(const std::shared_ptr &contxet, const std::string &name);
+```
+
+Sets the vendor name of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `name`: the vendor name to set.
+
+#### GetVendorName
+
+```cpp
+static const std::string GetVendorName(const std::shared_ptr &contxet);
+```
+
+Gets the vendor name of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
+
+- Returns
+ - The vendor name of the Context object.
+
+#### SetThreadNum
+
+```cpp
+static void SetThreadNum(const std::shared_ptr &contxet, int num);
+```
+
+Sets the thread number of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `num`: the thread number to set.
+
+#### GetThreadNum
+
+```cpp
+static int GetThreadNum(const std::shared_ptr &contxet);
+```
+
+Gets the thread number of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
+
+- Returns
+ - The thread number of the Context object.
+
+#### SetAllocator
+
+```cpp
+static void SetAllocator(const std::shared_ptr &contxet, std::shared_ptr alloc);
+```
+
+Sets the Allocator of a Context object.
+
+- Parameters
-#### GetDeviceTarget
+ - `context`: the Context object to modify.
+ - `alloc`: the Allocator to set.
+
+#### GetAllocator
```cpp
-const std::string &GetDeviceTarget() const;
+static std::shared_ptr GetAllocator(const std::shared_ptr &contxet);
```
-Obtains the target device type.
+Gets the Allocator of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
- Returns
+ - The Allocator of a Context object.
+
+#### ConfigCPU
+
+```cpp
+static void ConfigCPU(const std::shared_ptr &contxet, bool config);
+```
+
+Sets the switch of the CPU of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `config`: the boolean value to set.
+
+#### IfCPUEnabled
+
+```cpp
+static bool IfCPUEnabled(const std::shared_ptr &contxet);
+```
+
+Gets the boolean value that indicates whether the CPU is enabled of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
+
+- Returns
+ - The boolean value that indicates whether the CPU is enabled.
+
+#### ConfigCPUFp16
+
+```cpp
+static void ConfigCPUFp16(const std::shared_ptr &contxet, bool config);
+```
+
+Sets the switch of the half-precision float feature of the CPU of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `config`: the boolean value to set.
+
+#### IfCPUFp16Enabled
+
+```cpp
+static bool IfCPUFp16Enabled(const std::shared_ptr &contxet);
+```
+
+Gets the boolean value that indicates whether the half-precision float feature of the CPU is enabled of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
+
+- Returns
+ - The boolean value that indicates whether the half-precision float feature of the CPU is enabled.
+
+#### SetCPUBindMode
+
+```cpp
+static void SetCPUBindMode(const std::shared_ptr &contxet, lite::CpuBindMode mode);
+```
+
+Sets the bind mode to CPU cores of working threads of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `mode`: the bind mode to CPU cores of working threads to set,options are `CpuBindMode::NO_BIND`, `CpuBindMode::MID_CPU`, `CpuBindMode::HIGHER_CPU`.
+
+#### GetCPUBindMode
+
+```cpp
+static lite::CpuBindMode GetCPUBindMode(const std::shared_ptr &contxet);
+```
+
+Gets the bind mode to CPU cores of working threads of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
+
+- Returns
+ - The bind mode to CPU cores of working threads.
+
+#### ConfigGPU
+
+```cpp
+static void ConfigGPU(const std::shared_ptr &contxet, bool config);
+```
+
+Sets the switch of the GPU of a Context object.
+
+- Parameters
- Current DeviceTarget type.
+ - `context`: the Context object to modify.
+ - `config`: the boolean value to set.
-#### GetDeviceID
+#### IfGPUEnabled
```cpp
-uint32_t GetDeviceID() const;
+static bool IfGPUEnabled(const std::shared_ptr &contxet);
```
-Obtains the device ID.
+Gets the boolean value that indicates whether the GPU is enabled of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
- Returns
+ - The boolean value that indicates whether the GPU is enabled.
+
+#### ConfigGPUFp16
- Current device ID.
+```cpp
+static void ConfigGPUFp16(const std::shared_ptr &contxet, bool config);
+```
+
+Sets the switch of the half-precision float feature of the GPU of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `config`: the boolean value to set.
-#### SetDeviceTarget
+#### IfGPUFp16Enabled
```cpp
-Context &SetDeviceTarget(const std::string &device_target);
+static bool IfGPUFp16Enabled(const std::shared_ptr &contxet);
```
-Configures the target device.
+Gets the boolean value that indicates whether the half-precision float feature of the GPU is enabled of a Context object.
- Parameters
- - `device_target`: target device to be configured. The options are `kDeviceTypeAscend310` and `kDeviceTypeAscend910`.
+ - `context`: the Context object to read.
- Returns
+ - The boolean value that indicates whether the half-precision float feature of the GPU is enabled.
- MindSpore Context instance object.
+#### ConfigNPU
-#### SetDeviceID
+```cpp
+static void ConfigNPU(const std::shared_ptr &contxet, bool config);
+```
+
+Sets the switch of the NPU of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `config`: the boolean value to set.
+
+#### IfNPUEnabled
```cpp
-Context &SetDeviceID(uint32_t device_id);
+static bool IfNPUEnabled(const std::shared_ptr &contxet);
```
-Obtains the device ID.
+Gets the boolean value that indicates whether the NPU is enabled of a Context object.
- Parameters
- - `device_id`: device ID to be configured.
+ - `context`: the Context object to read.
- Returns
+ - The boolean value that indicates whether the NPU is enabled.
+
+#### SetNPUFrequency
- MindSpore Context instance object.
+```cpp
+static void SetNPUFrequency(const std::shared_ptr &contxet, int freq);
+```
+
+Sets the working frequency of the NPU of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to modify.
+ - `freq`: the frequency to set, ranges from 1 to 3, 4 is optional on `Kirin9000`. Validity is judged during runtime.
+
+#### GetNPUFrequency
+
+```cpp
+static int GetNPUFrequency(const std::shared_ptr &contxet);
+```
+
+Gets the working frequency of the NPU of a Context object.
+
+- Parameters
+
+ - `context`: the Context object to read.
+
+- Returns
+ - The working frequency of the NPU.
## Serialization
@@ -86,53 +334,65 @@ The Serialization class is used to summarize methods for reading and writing mod
#### LoadModel
+```cpp
+static Graph LoadModel(const std::string &file, ModelType model_type);
+```
+
+Loads model file from path. Unavailable in mindspore-lite.
+
+- Parameters
+
+ - `file`: the path of model file.
+ - `model_type`: the Type of model file, options are `ModelType::kMindIR`, `ModelType::kOM`.
+
+- Returns
+
+ An instance of `Graph`, used for storing graph data.
+
+```cpp
+static Graph LoadModel(const void *model_data, size_t data_size, ModelType model_type);
+```
+
+Loads model file from memory buffer.
+
- Parameters
- - `file`: model file path.
- - `model_type`: model file type. The options are `ModelType::kMindIR` and `ModelType::kOM`.
+ - `model_data`: a buffer filled by model file.
+ - `data_size`: the size of the buffer.
+ - `model_type`: the Type of model file, options are `ModelType::kMindIR`, `ModelType::kOM`.
- Returns
- Object for storing graph data.
+ An instance of `Graph`, used for storing graph data.
## Model
\#include <[model.h](https://gitee.com/mindspore/mindspore/blob/master/include/api/model.h)>
-A Model class is used to define a MindSpore model, facilitating computational graph management.
+The Model class is used to define a MindSpore model, facilitating computational graph management.
### Constructor and Destructor
```cpp
-Model(const GraphCell &graph);
+explicit Model(const GraphCell &graph, const std::shared_ptr &model_context);
+explicit Model(const std::vector