POST
/
v1
/
completions
import { AtomaSDK } from "atoma-sdk";

const atomaSDK = new AtomaSDK({
  bearerAuth: process.env["ATOMASDK_BEARER_AUTH"] ?? "",
});

async function run() {
  const completion = await atomaSDK.completions.completionsCreate({
    model: "meta-llama/Llama-3.3-70B-Instruct",
    prompt: "Hello, world!",
  });

  console.log(completion.choices[0]);
}

run();
{
  "choices": [
    {
      "text": "This is a test",
      "index": 0,
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "created": "2021-01-01T00:00:00.000Z",
  "id": "cmpl-1234567890",
  "model": "meta-llama/Llama-3.3-70B-Instruct",
  "object": "text_completion",
  "system_fingerprint": "system-fingerprint",
  "usage": {
    "completion_tokens": 10,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 10,
      "audio_tokens": 0,
      "reasoning_tokens": 10,
      "rejected_prediction_tokens": 0
    },
    "prompt_tokens": 10,
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 10
    },
    "total_tokens": 20
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Chat completions

The response is of type object.