Skip to content

Ask AI

Powered by Blaze

Answers come from E2E Cloud documentation. AI can make mistakes.

Get started with TIR GenAI API

View as Markdown

Send a prompt to a model in the Playground, then call the same model from your own code with the OpenAI SDK.

  1. In TIR, open your project. In the side menu’s PRODUCTS list, select GenAI API to see every model you can use.
  2. Select an available model, such as DeepSeek V3, which the examples use. A model that is out of inventory offers Request instead. Which models are available changes over time; the FAQ explains what that means for code you have written.
  3. Type a prompt in the chat and send it.

Every GenAI API request needs a token to authenticate it.

  1. In the side menu, select Personal Access Tokens.
  2. Select Create Token. Keep the generated name or type your own, then confirm.
  3. Copy the Auth Token shown in the dialog and store it somewhere safe. You can copy it again later from the Personal Access Tokens list.

DeepSeek V3 is a text-generation model, so it works with the OpenAI SDK pointed at its TIR endpoint.

  1. Install the SDK:

    pip install -U openai
  2. On the model’s page, select Get Code, then the Python tab. The sample already has the model’s endpoint for your project.

  3. Copy the sample into a file, and set its API key value to the Auth Token you copied. Use the Auth Token here rather than E2E’s separate API Key.

  4. Run the script. The model’s reply prints to your console.

If a request fails, Troubleshooting TIR GenAI API explains what to do.

Was this page helpful?