What you can build
- Response generation: Generate responses on your own datasets and review how a model handles domain-specific questions.
- Data enrichment: Summarize documents, extract information, or categorize text before further curation.
- Model-assisted labeling: Generate candidate labels, then send predictions to Annotate for human review and correction.
- Model comparison: Run different Fireworks-hosted models on the same data to compare output quality for your use case.
Before you begin
You need:- A Labelbox enterprise plan with access to custom model integrations. Contact sales for plan options.
- A Fireworks account, an API key, and access to a text-generation model.
- Data in Labelbox Catalog and, for labeling tasks, an ontology that defines the expected predictions.
- An HTTPS adapter endpoint that you host and make accessible to Labelbox.
Fireworks’ OpenAI-compatible API and Labelbox’s custom model endpoint use different request and response formats. Register your adapter URL in Labelbox, not the Fireworks Chat Completions URL. The adapter translates requests, calls Fireworks, and returns predictions in Labelbox’s expected format.
Set up Fireworks
- Sign in to Fireworks and create an API key.
- Choose a model from the Fireworks model library. Copy its full model identifier from the model’s API example rather than its display name.
- Confirm that the model is available through serverless inference, or create a dedicated deployment and use the model identifier supplied for that deployment.
- Store the API key as a secret in your adapter’s hosting environment. Do not put it in prompts, data rows, or client-side code.
Check access to your model
Use a small request to verify your Fireworks credentials and model selection before connecting Labelbox. SetFIREWORKS_API_KEY and FIREWORKS_MODEL in your local environment; use the exact model identifier from Fireworks.
curl and jq. A successful response includes generated text in choices[0].message.content. This check calls Fireworks directly; it does not test your Labelbox adapter. Fireworks usage is subject to your account’s billing and rate limits.
Connect the APIs with an adapter
The integration follows this request path:Translate the request
Labelbox sends messages inprompt, with each message containing a role and ordered parts. For a text-only integration, map each message to a Fireworks messages entry, preserve its role, and combine its text parts in order.
For example, this Labelbox request:
model and generation parameters:
Return a Labelbox prediction
Extract the generated text fromchoices[0].message.content. Return the prediction format required by your Labelbox task, not the full Fireworks response object.
For an ontology with a free-text feature named summary, an adapter can return a prediction shaped like this:
Add the model to Labelbox
- Open Models, click Create, and select Custom Model.
- Select the data type supported by your adapter. For this text-only workflow, use text data.
- Give the model a descriptive name, such as
Fireworks — document summarization. - Set HTTP endpoint to your deployed adapter URL.
- If your adapter requires a secret, configure Secret for the adapter’s authentication. This is separate from the Fireworks API key stored by your adapter.
- Add a description that records the Fireworks model identifier and intended task, then click Create model.
Generate and review predictions
- Click + Model run on your custom model and select a small set of representative data rows.
- Configure the prompt and, when required, select an ontology that matches your adapter’s output.
- Generate a preview and confirm that the predictions contain the expected text or labels.
- Submit the model run, then inspect predictions in Catalog.
- Send predictions to Annotate for human review, or export predictions for downstream workflows.
Troubleshooting
Next steps
Fireworks documentation
Explore model availability, deployment options, and API configuration.
Custom model integration
Review the complete Labelbox endpoint contract and supported prediction formats.