Manage your API keys and monitor usage
Keep your API keys secure. Never share them publicly.
Install the IdleCloud Python client:
Use it in your code:
from idlecloud import IdleCloud
api_key = 'ic_your_api_key_here'
# Create a client instance
client = IdleCloud(api_key=api_key)
# Make a request
response = client.chat.completions.create(
model="gpt-oss-20b", # Model is required
messages=[
{"role": "user", "content": "Hello!"}
],
stream=True
)
# Print the response as it streams in
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)