Quickstart
Get started using with Inference Cloud APIs
Get an API key
-
Visit inference.net and create an account.
-
On the dashboard, visit the
API Keys
tab on the left sidebar. Create an API key or use the default key. -
Copy the API key to your clipboard by clicking the copy icon to the right of the key.
-
In your terminal, set the
INFERENCE_API_KEY
environment variable to the API key you copied.
Test Request
Perform a simple curl request to the Inference Cloud API.
The request output should stream into your terminal.
OpenAI SDK
Inference Cloud is compatible with the OpenAI Chat API. You can use the official OpenAI SDK to interact with the Inference Cloud API.
We support both streaming and non-streaming requests, as well as the following parameters:
max_tokens
temperature
top_p
frequency_penalty
presence_penalty
If you need parameters that are not list here, please contact us and we’ll add them.
Note: Make sure you export the INFERENCE_API_KEY
environment variable before running the code below.