Visit the Models page to check the details of currently available models, including model pricing, maximum usage limits for users, and more. You can also test the models directly through the “Online Experience” feature on the model details page.
3. Experience GenAI Capabilities in the Playground
Go to the “Playground” page. On the left sidebar, you can choose language models, text-to-image models, or image-to-image models. Select the corresponding model to start real-time testing. Enter the relevant parameters and prompt, then click the “Run” button to see the results generated by the model.
You can directly use your API key for online calls on the platform’s “Documentation” page, where you can generate code snippets in the corresponding programming language.
Some large language models currently support being called via the OpenAI library.
After installing Python 3.7.1 or a higher version and setting up a virtual environment, you can install the OpenAI Python library. Run the following command from your terminal/command line:
Copy
pip install --upgrade openai
Once completed, running pip list will display the Python libraries installed in your current environment. Confirm that the OpenAI Python library has been successfully installed.
You can then call the API using OpenAI’s related interfaces. The platform currently supports most OpenAI-related parameters.
Copy
from openai import OpenAI client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.ap.siliconflow.com/v1") response = client.chat.completions.create( model='deepseek-ai/DeepSeek-R1', messages=[ {'role': 'user', 'content': "tell me a story"} ], stream=True) for chunk in response: if not chunk.choices: continue if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True) if chunk.choices[0].delta.reasoning_content: print(chunk.choices[0].delta.reasoning_content, end="", flush=True)