Skip to main content

Get Started


Get Started

Hundreds of fast and cheap AI image generation APIs for 10000+ models. Fastest generation in just 2s, Pay-As-You-Go, a minimum of $0.0015 for each image, you can add your own models and avoid GPU maintenance.

1. Visit novita.aiopen in new window

2. Click the "Log In" button in the top navigation bar

  • At present, we exclusively offer both Google login and Github login authentication method.

3. Create an API key

  • Currently authentication to the API is performed via Bearer Token in the request header (e.g. -H "Authorization: Bearer ***").

  • We'll provision a new API key Hereopen in new window.

Key image
Key image
  • You can create your own key with the Add new key.

4. Top up your account

  • In your account dashboard, you will see a Credit section. We give each logged-in user 10 free chances to generate a picture. Hereopen in new window you will find the historical usage data of your account.
Account
Account
Billing
Billing

5. Get your balance

  • This interface facilitates user information queries, primarily focusing on functions available to the user and their account balance.

Request:

curl \
-X GET https://api.novita.ai/v3/user \
-H "Authorization: Bearer {{your Key in Get Started: `Quickstart`}}"

Response:

{
  "allow_features": [
    "upload_model"
  ],
  "credit_balance": 755832
}

The allow_features in response indicates the features that the user is allowed to use. The credit_balance indicates the remaining credit balance of the user, which is calculated as Credit * 10000.(Credit was in the top right corner of the official website)

6. Configure S3 address

  • This API enables you to configure the S3 address associated with your account, facilitating the storage of generated images. In the event that no S3 address is specified, the system will automatically store the generated images in our default S3 bucket.

Please change your AWS S3 Bucket Policy configuration to the following format at first. (Replace ${BucketName} with the real target bucket name):

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "CanonicalUser": "e98cde8d11ec7c03ac08688f1a933b08b0f0f7746b21c4f2e7b2c8202cc0532f"
      },
      "Action": [
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": "arn:aws:s3:::${BucketName}/*"
    }
  ]
}

Configure the AWS S3 address of your account:

Request:

curl \
-X POST https://api.novita.ai/v2/config \
-H "Authorization: Bearer {{your Key in Get Started: `Create account`}}" \
-H "Content-Type: application/json" \
-d '{"s3_region":"ap-southeast-1","s3_bucket":"stars-test","s3_path":"/test"}'

Response:

{
  "code": 0,
  "msg": ""
}

Get current AWS S3 address of your account:

Request:

curl --location --request GET 'http://api.novita.ai/v2/config' \
--header 'Authorization: Bearer {{your Key in Get Started: `Create account`}}'

Response:

{
    "code": 0,
    "msg": "",
    "data": {
        "region": "ap-southeast-1",
        "bucket": "stars-test",
        "path": "/test/"
    }
}

Delete current AWS S3 address of your account, after the call is successful, it will be temporarily stored in novita.ai by default.

Request:

curl --location --request DELETE 'http://api.novita.ai/v2/config' \
--header 'Authorization: Bearer {{your Key in Get Started: `Create account`}}'

Response:

{
    "code": 0,
    "msg": ""
}

7. Explore more

Check out the following guides to see what else you can do with novita.ai:

If you encounter any questions, please reach out to us on discord.open in new window