API

Arkane Cloud API

Arkane Cloud Platform offers an API for inference. Here are examples of Python, JavaScript SDK and cURL command that makes an API request from your terminal:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://cloud.arkanecloud.com/",
    api_key=os.environ.get("ARKANE_CLOUD_API_KEY"),
)

completion = client.chat.completions.create(
    model="meta-llama/Meta-Llama-3.1-70B-Instruct",
    messages=[
        {
            "role": "user",
            "content": """Hello!"""
        }
    ],
    temperature=0.6
)

print(completion.to_json())
chevron-rightResponsehashtag

For more examples, see Examples of using the Arkane Cloud API.

Code from playground

In the Arkane Cloud inference playgroundarrow-up-right, you can view your model setup and chat as code that makes API requests, and use this code in your applications.

Last updated