# Generation

{% hint style="info" %}
To see real examples, take a look at the [Usage](/rest-api/sdk/usage.md) and [Tutorials](/tutorials/quick-start-guide.md) pages.

Below, only a general description of how to create the SDKs is provided.
{% endhint %}

To generate SDK client stubs using the OpenAPI Generator, follow these steps:

1. **Install** [**OpenAPI Generator**](https://openapi-generator.tech): Ensure that you have the OpenAPI Generator installed on your system. You can download it from the official GitHub repository or use package managers like npm or Homebrew, depending on your operating system.
2. **Prepare your OpenAPI Specification**: Make sure you have an OpenAPI Specification file (usually in JSON or YAML format) that describes your API's endpoints, parameters, responses, and other relevant details. You can use the OpenAPI Specification file available at <https://api.metacopier.io/rest/api/documentation/v3/api-docs>.
3. **Choose the Language and Framework**: Decide on the programming language and framework you want to generate the client stubs for. The OpenAPI Generator supports a wide range of languages, including Java, JavaScript, Python, Ruby, Go, and more.
4. **Run the OpenAPI Generator**: Use the command-line interface of the OpenAPI Generator to generate the client stubs. Here's a basic example of how to run the generator:

```bash
codeopenapi-generator-cli generate -i https://api.metacopier.io/rest/api/documentation/v3/api-docs -g your_language -o output_directory
```

Replace `your_language` with the desired programming language or framework (e.g., `java`, `javascript`, `python`), and `output_directory` with the directory where you want the generated code to be saved.

5. **Customize Generation Options (Optional)**: Optionally, customize the generation process by specifying additional options such as package names, library versions, and code formatting preferences. Refer to the documentation of the OpenAPI Generator for a full list of available options.
6. **Review Generated Code**: Once the generation process is complete, review the generated client stubs to ensure they meet your requirements. You may need to make adjustments or enhancements based on your specific use case or project needs.
7. **Integrate Client Stubs into your Project**: Finally, integrate the generated client stubs into your project by importing them into your codebase and using them to interact with the API. Refer to the documentation and examples provided by the OpenAPI Generator for guidance on how to use the generated code effectively.

By following these steps, you can generate SDK client stubs using the OpenAPI Generator and seamlessly integrate them into your software projects, saving time and effort in API integration and development.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.metacopier.io/rest-api/sdk/generation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
