Skip to main content
Get started using the Infercom API in just a few minutes.
1

Get your API key.

To generate an API key, go to the API keys and URLs page. When generating API keys, be sure to save them securely, as they can’t be viewed again.
You can generate and use up to 25 API keys.
2

Pick a model.

View the available models and details on the Infercom Inference Service models page.
We’ll use MiniMax-M2.7 as an example for the remainder of this guide.
3

Make an API request.

You can make an inference request in multiple ways. See two examples below:
  • SambaNova SDK - Use Javascript or Python for a more flexible integration.
  • OpenAI client library – Use Javascript or Python for a more flexible integration.
  • CURL command – Send a request directly from the command line.

SambaNova SDK

To get started, choose your preferred programming language. Next, open a terminal and run the command to install the SambaNova SDK.
Next, copy the following code into a new file.
After copying the code into the file, replace the placeholder "your-infercom-api-key" with your actual API key. Then, run the file in a terminal using the command shown below.
After running the program, you should see output similar to the example shown below.

OpenAI client library

To get started, select your preferred programming language. Then, open a terminal window and run the command to install the OpenAI library.
Next, copy the following code into a new file.
Once copied into the file, replace the placeholder "your-infercom-api-key" with your API key. Then run the file with the command below in a terminal window.
After you run the program, you should now see an output like similar to the one below.

CURL command

In a terminal window, run the CURL command to make your first request to the API.

Next Steps

Now that you can make requests to a model, great potential of building AI-powered applications await. Get inspired of what to build by exploring our AI Starter Kits, a collection of open-source Python projects.