---
title: "First steps with the OVHcloud API"
description: "Learn how to use OVHcloud APIs and pair them with your applications."
url: https://docs.us.ovhcloud.com/en/manage-and-operate/api/first-steps
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# First steps with the OVHcloud API

**Learn how to use OVHcloud APIs and pair them with your applications.**

The APIs available on [https://api.us.ovhcloud.com/](https://api.us.ovhcloud.com/) allow you to purchase, manage, update, and configure OVHcloud products without using a graphical interface such as the Control Panel.

 

## Requirements

- Access to your [OVHcloud account](https://docs.us.ovhcloud.com/en/account/account-information/create-account.md)

- Access to the [OVHcloud API](https://api.us.ovhcloud.com/)

 

## Topics

- [Simple Use](#simple-use)

  - [Sign in to OVHcloud APIs](#sign-in-to-ovhcloud-apis)
  - [Explore available APIs](#explore-available-apis)
  - [Run API](#run-api)

- [Advanced usage: pair OVHcloud APIs with an application](#advanced-usage-pair-ovhcloud-apis-with-an-application)

  - [Create your app keys](#create-your-app-keys)
  - [First API usage](#first-api-usage)
  - [List and revoke your keys](#list-and-revoke-your-keys)

- [Go further](#h_01J15BBC8R0RFND4CK3BV5PW3K)

 

## Instructions

**Warning:**

**NOTE:** OVHcloud provides services for which you are responsible for their configuration and management. You are therefore responsible for their proper functioning.\
\
This tutorial is designed to help you as much as possible with common tasks. If you are having difficulty performing these actions, please contact a specialized service provider. OVHcloud cannot provide you with technical support in this regard.

 

### Simple Use

#### Sign in to OVHcloud APIs

On the [OVHcloud API](https://api.us.ovhcloud.com/) page, click `Explore the OVHcloud API` to view the list of APIs.

To use the APIs on your products, you must sign in to this site using your OVHcloud credentials.

- Click `Authentication` in the upper left.
- Select `Login with OVHcloud SSO`.

- Enter your OVHcloud credentials and click `Login`.

  **Note:**

  If you are a sub-user, enter your account ID (in the format **XXXX-XXXX-XX/user**) and password.

- Click `Authorize`.

  **Note:**

  If your OVHcloud account is protected by [two-factor authentication](https://docs.us.ovhcloud.com/en/account/account-information/secure-account-two-factor-authentication.md), you will also need to enter the code generated by SMS or OTP mobile application or U2F key.

 

#### Explore available APIs

You can see a list of OVHcloud products that can be managed with APIs in the upper-left corner. This list is sorted alphabetically.

For example, to view the Public Cloud APIs, click **/cloud** in the list.

After you click the product, a list of the product’s APIs appears below.

There is also a Filter feature to limit the visible API calls. You can also use the selector to the left of the branch name to switch between the **/v1** and **/v2** branches of the API.

 

#### Run API

There are four types of APIs available that use what are called HTTP methods:

**GET**

The GET method is used to retrieve data from a resource.

For example, to retrieve a list of your instances, use the following API:

[GET /cloud/project/{serviceName}/instance](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#get-/cloud/project/-serviceName-/instance)

**POST**

The POST method is used to send additional data to the resource.

For example, to create a new instance, use the following API:

[POST /cloud/project/{serviceName}/instance](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#post-/cloud/project/-serviceName-/instance)

**PUT**

The PUT method is used to replace the current data in the resource with the data in the query.

For example, to alter an instance in your project, use the following API:

[PUT /cloud/project/{serviceName}/instance/{instanceId}](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#put-/cloud/project/-serviceName-/instance/-instanceId-)

**DELETE**

The DELETE method is used to delete the called resource.

For example, to delete an instance from your project, use the following API:

[DELETE /cloud/project/{serviceName}/instance/{instanceId}](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#delete-/cloud/project/-serviceName-/instance/-instanceId-)

 

##### **API parameters**

After you click the API you want, the **REQUEST** section allows you to assign variables for its application.

For example, when retrieving a list of instances in a project, you must enter the **serviceName** and can also add information in the **region** variable.

Once you have set the parameters, you can launch the API by clicking `TRY`.

The `RESPONSE` tab below provides the API execution report.

Scrolling down further will reveal PHP and Python tabs containing the elements to be added to your script, depending on the language used.

 

### Advanced usage: pair OVHcloud APIs with an application

#### Create your app keys

Any application that wants to communicate with the OVHcloud API must be declared in advance.

**Tip:**

Click the tab for the type of user you are: Root or Sub.

##### Root User

Use the following link: [https://api.us.ovhcloud.com/createToken/](https://api.us.ovhcloud.com/createToken/).
Fill in:
- your OVHcloud **Account ID** (email address) and **password**
- a script **name** and **description**
- a **Validity** period
- the **Rights** you want to allow

**Note:** To allow all OVHcloud APIs for an HTTP method, put an asterisk (`*`) into the "path" field.

Click the `+` button to add additional rights to PUT, POST, and/or DELETE. Click the `-` button to remove any of those rights.
Click `Create keys`.

##### Sub-User

Use the following link: [https://us.ovhcloud.com/auth/api/createToken](https://us.ovhcloud.com/auth/api/createToken).
Log in with your sub-user account ID (in the format **XXXX-XXXX-XX/user**) and password and click `Login`.

Fill in:
- an application **name** and **description**
- a **Validity** period
- the **Rights** you want to allow

**Note:** To allow all OVHcloud APIs for an HTTP method, put an asterisk (`*`) into the "path" field.

Click the `+` button to add additional rights to PUT, POST, and/or DELETE. Click the `-` button to remove any of those rights.
Click `Create`.

 

The next screen will show you a set of three keys:

- the application key, or **AK**. For example:

```
7kbG7Bk7S9Nt7ZSV
```

- the application secret, or **AS**, is not to be disclosed. For example:

```
EXEgWIz07P0HYwtQDs7cNIqCiQaWSuHF
```

- the consumer key, or **CK**, is not to be disclosed. For example:

```
MtSwSrPpNjqfVSmJhLbPyr2i45lSwPU1
```

In this case, the **CK** key is attached to your account.

The **CK** token can be used for rights delegation.

 

#### First API usage

Once you have obtained your three keys (**AK**, **AS**, **CK**), you can sign API requests. The signature is calculated as follows:

```
"$1$" + SHA1_HEX(AS+"+"+CK+"+"+METHOD+"+"+QUERY+"+"+BODY+"+"+TSTAMP)
```

To simplify the development of your applications, OVHcloud provides API wrappers in multiple languages. Using them will help you avoid worrying about signing requests so that you can focus on developing your application.

- _Perl_: [https://api.us.ovhcloud.com/wrappers/OvhApi-perl-1.1.zip](https://api.us.ovhcloud.com/wrappers/OvhApi-perl-1.1.zip)
- _Python_: [https://github.com/ovh/python-ovh](https://github.com/ovh/python-ovh)
- _PHP_: [https://github.com/ovh/php-ovh](https://github.com/ovh/php-ovh)
- _Node.js_: [https://github.com/ovh/node-ovh](https://github.com/ovh/node-ovh)
- _Swift_: [https://github.com/ovh/swift-ovh](https://github.com/ovh/swift-ovh)
- _C#_: [https://github.com/ovh/csharp-ovh](https://github.com/ovh/csharp-ovh)

Here is an example of how to use the `/me` section to manage your OVHcloud account:

```python
import ovh

# Instantiate. Visit https://api.us.ovhcloud.com/createToken/?GET=/me

# to get your credentials

client = ovh.Client(
    endpoint='ovh-eu',
    application_key='<application key>',
    application_secret='<application secret>',
    consumer_key='<consumer key>',
)

# Print nice welcome message

print("Welcome", client.get('/me')['firstname'])
```

 

#### List and revoke your keys

##### Via OVHcloud API

To see or revoke your keys, you must use the [OVHcloud API](https://api.us.ovhcloud.com/).
List the keys IDs:

[GET /me/api/application](https://api.us.ovhcloud.com/console/?section=/me&branch=v1#get-/me/api/application)

Get key details:

[GET /me/api/application/{applicationId}](https://api.us.ovhcloud.com/console/?section=/me&branch=v1#get-/me/api/application/-applicationId-)

Revoke a key:

[DELETE /me/api/application/{applicationId}](https://api.us.ovhcloud.com/console/?section=/me&branch=v1#delete-/me/api/application/-applicationId-)

##### Via OVHcloud Control Panel

From the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/), navigate to `API keys` via the `Identity, Security & Operations` menu.
From there, you can `Create an API key` or delete one via the more options `...` menu.

 

## Go further

Browse all the [API guides](https://docs.us.ovhcloud.com/en/manage-and-operate/api/landing-page-api.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.
